【发布时间】:2017-02-16 04:19:52
【问题描述】:
我正在尝试使用 python 在 GPU 上训练图形,以从 C++ 进程加载图形。
status = ReadBinaryProto(Env::Default(), "model.pb", &graph_def);
session->Create(graph_def);
然后我收到错误消息
“无法将设备分配给节点...因为在此过程中没有注册符合该规范的设备;可用设备:/job:localhost/replica:0/task:0/cpu:0”
对于 python train.import_meta_graph API 有 clear_devices 参数,但它在 C++ API 上的等价物是什么?
为了加载图表,我在 Windows 上使用 Tensorflor,使用 CMake 和 -Dtensorflow_ENABLE_GPU=ON 构建,所以我的 vcxproj 有 GOOGLE_CUDA 定义。
我已阅读 Tensorflow, restore variables in a specific device,但它仅适用于 python API。
【问题讨论】:
标签: c++ machine-learning tensorflow