美文网首页
"Dst tensor is not initialized"

"Dst tensor is not initialized"

作者: 宣雄民 | 来源:发表于2019-02-23 16:52 被阅读0次

    Error example since I have corrected my training problem, I then quote similar error from other people's work.

    Epoch: 0001 cost= 29.917553501
    Epoch: 0002 cost= 21.929896693
    Epoch: 0003 cost= 21.063875407
    Epoch: 0004 cost= 20.457020144
    Epoch: 0005 cost= 20.084428289
    Epoch: 0006 cost= 19.814794980
    Epoch: 0007 cost= 19.674670629
    Epoch: 0008 cost= 19.510438999
    Epoch: 0009 cost= 19.309689613
    Epoch: 0010 cost= 19.223995275
    Epoch: 0011 cost= 19.161345129
    Epoch: 0012 cost= 18.985856709
    Epoch: 0013 cost= 18.917688493
    Epoch: 0014 cost= 18.832972273
    Epoch: 0015 cost= 18.742634454
    Epoch: 0016 cost= 18.695894625
    Epoch: 0017 cost= 18.643278683
    Epoch: 0018 cost= 18.609112186
    Epoch: 0019 cost= 18.444614899
    Epoch: 0020 cost= 18.532375607
    Epoch: 0021 cost= 18.437554449
    Epoch: 0022 cost= 18.310914770
    Epoch: 0023 cost= 18.289282742
    Epoch: 0024 cost= 18.214274961
    Epoch: 0025 cost= 18.293197173
    Optimization Finished!
    Accuracy:
    ---------------------------------------------------------------------------
    InternalError                             Traceback (most recent call last)
    <ipython-input-17-f661f1e1e9de> in <module>()
         24     # Calculate accuracy
         25     accuracy = tf.reduce_mean(tf.cast(correct_prediction, "float"))
    ---> 26     print "Accuracy:", accuracy.eval({x: mnist.test.images, y: mnist.test.labels})
    
    /home/burness/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in eval(self, feed_dict, session)
        500 
        501     """
    --> 502     return _eval_using_default_session(self, feed_dict, self.graph, session)
        503 
        504 
    
    /home/burness/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in _eval_using_default_session(tensors, feed_dict, graph, session)
       3332                        "the tensor's graph is different from the session's "
       3333                        "graph.")
    -> 3334   return session.run(tensors, feed_dict)
       3335 
       3336 
    
    /home/burness/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict, options, run_metadata)
        338     try:
        339       result = self._run(None, fetches, feed_dict, options_ptr,
    --> 340                          run_metadata_ptr)
        341       if run_metadata:
        342         proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
    
    /home/burness/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _run(self, handle, fetches, feed_dict, options, run_metadata)
        562     try:
        563       results = self._do_run(handle, target_list, unique_fetches,
    --> 564                              feed_dict_string, options, run_metadata)
        565     finally:
        566       # The movers are no longer used. Delete them.
    
    /home/burness/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
        635     if handle is None:
        636       return self._do_call(_run_fn, self._session, feed_dict, fetch_list,
    --> 637                            target_list, options, run_metadata)
        638     else:
        639       return self._do_call(_prun_fn, self._session, handle, feed_dict,
    
    /home/burness/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _do_call(self, fn, *args)
        657       # pylint: disable=protected-access
        658       raise errors._make_specific_exception(node_def, op, error_message,
    --> 659                                             e.code)
        660       # pylint: enable=protected-access
        661 
    
    InternalError: Dst tensor is not initialized.
         [[Node: _recv_Placeholder_1_0/_27513 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_267__recv_Placeholder_1_0", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
         [[Node: Mean_6/_27517 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_277_Mean_6", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
    
    • The SOLUTION is quite simple, you just need to restart your ipython notebook in order to release some of the stuck background process or fully used memory space.

    相关文章

      网友评论

          本文标题:"Dst tensor is not initialized"

          本文链接:https://www.haomeiwen.com/subject/jhppyqtx.html