【发布时间】:2017-07-17 04:57:21
【问题描述】:
我在 python 中训练了我的 tf 模型:
with sv.managed_session(master='') as sess:
with tf.device("/gpu:1"):#my systerm has 4 nvidia cards
并使用命令行抽象模型:
freeze_graph.py --clear_devices False
在测试阶段,我将设备设置如下:
tensorflow::graph::SetDefaultDevice("/gpu:1", &tensorflow_graph);
但有些地方不对:
ould not create Tensorflow Graph:
Invalid argument: Cannot assign a device to node '.../RNN_backword/while/Enter':
Could not satisfy explicit device specification '/gpu:1'
because no devices matching that specification are registered in this process;
available devices: /job:localhost/replica:0/task:0/cpu:0
那么,我怎样才能正确使用gpu i??
有人可以帮忙吗??
【问题讨论】:
标签: python c++ tensorflow gpu