Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when restoring model #27

Open
thumbe12856 opened this issue Jun 20, 2018 · 1 comment
Open

Error when restoring model #27

thumbe12856 opened this issue Jun 20, 2018 · 1 comment

Comments

@thumbe12856
Copy link

thumbe12856 commented Jun 20, 2018

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?

@leeswon
Copy link

leeswon commented Nov 30, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants