You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After training the model for 1 day, I found that there was no meta graph file, so I couldn't restore it in src/demo.py. So I modified the src/worker.py:23, in the class of FastSave(), from super(FastSaver, self).save(sess, save_path, ..., False), to super(FastSaver, self).save(sess, save_path, ... , True). And this did create the meta graph file.
But when I used the demo.py to restore it, I got the error:
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'global/predictor/flast/b/Adam_1': Operation was explicitly assigned to /job:ps/task:0/device:CPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.
[[Node: global/predictor/flast/b/Adam_1 = VariableV2[_class=["loc:@global/predictor/flast/b"], container="", dtype=DT_FLOAT, shape=[288], shared_name="", _device="/job:ps/task:0/device:CPU:0"]()]]
Why the meta graph was explicitly assigned the operation to /job:ps/task:0/device:CPU:0 ?
And what can I do to solve it?
The text was updated successfully, but these errors were encountered:
Hello, I spent some days with same issue, but I found out that demo.py is not the correct one to see trained behavior of the model. You could restore trained parameters and run test scenarios by using inference.py.
After training the model for 1 day, I found that there was no meta graph file, so I couldn't restore it in
src/demo.py
. So I modified thesrc/worker.py:23
, in the class of FastSave(), fromsuper(FastSaver, self).save(sess, save_path, ..., False)
, tosuper(FastSaver, self).save(sess, save_path, ... , True)
. And this did create the meta graph file.But when I used the
demo.py
to restore it, I got the error:Why the meta graph was explicitly assigned the operation to /job:ps/task:0/device:CPU:0 ?
And what can I do to solve it?
The text was updated successfully, but these errors were encountered: