TensorFlow错误:" CopyCPUTensorToGPU:GPU Memcpy失败"

时间:2016-04-04 03:28:44

标签: python gpu tensorflow memcpy

我正在运行TensorFlow附带的deepdream.ipnyb示例。第render_naive(T(layer)[:,:,:,channel])行给了我CopyCPUTensorToGPU: GPU Memcpy failed

一种可能性是,来自TensorFlow HEAD的笔记本电脑与我最近发布的TensorFlow安装电脑不匹配。

但如果是这种情况,我会期望更多的人有同样的问题。这似乎是一个非常罕见的错误,因为CopyCPUTensorToGPU: GPU Memcpy failed的{​​{3}}会产生总共5个结果。

第二种可能性是,这是我运行的特定机器的问题,EC2的g2.2xlarge。

Stack:EC2的g2.2xlarge机器,Python 2,Jupyter

完整追踪:

---------------------------------------------------------------------------
InternalError                             Traceback (most recent call last)
<ipython-input-4-401ce587fe66> in <module>()
     35     showarray(visstd(img))
     36 
---> 37 render_naive(T(layer)[:,:,:,channel])

<ipython-input-4-401ce587fe66> in render_naive(t_obj, img0, iter_n, step)
     27     img = img0.copy()
     28     for i in xrange(iter_n):
---> 29         g, score = sess.run([t_grad, t_score], {t_input:img})
     30         # normalizing the gradient, so the same step size should work
     31         g /= g.std()+1e-8         # for different layers and networks

/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict)
    347 
    348     # Run request and get response.
--> 349     results = self._do_run(target_list, unique_fetch_targets, feed_dict_string)
    350 
    351     # User may have fetched the same tensor multiple times, but we

/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _do_run(self, target_list, fetch_list, feed_dict)
    421         # pylint: disable=protected-access
    422         raise errors._make_specific_exception(node_def, op, e.error_message,
--> 423                                               e.code)
    424         # pylint: enable=protected-access
    425       raise e_type, e_value, e_traceback

InternalError: CopyCPUTensorToGPU: GPU Memcpy failed
     [[Node: import/mixed3b/_197 = _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_1001_import/mixed3b", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]

0 个答案:

没有答案