-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ch02 concept 6 Saving variable #20
Comments
Same issue (Not found: ; No such file or directory). Apparently, it tries to look for the file before creating it. |
running on a windows machine, change line : saver.save(sess, "spikes.ckpt") |
This line raises the error: It's pretty clear the parameter is asking for a path and not just a file name. So please fix the code into the format as @roip suggested or into a sub-directory format like this: |
I had to use |
except for "Parent directory of spikes.ckpt doesn't exist", on windows and spyder, the following error happened: ... FailedPreconditionError (see above for traceback): Attempting to use uninitialized value Variable I also doubt this is the spyder's problem because it works on python console. |
adding the following in spyder has fixed the problem! (including any file eg. loading variable) tf.reset_default_graph() |
saver.save(sess, "spikes.ckpt") doesn't work
require running tf.global_variables_initializer() for newer version of Tensorflow
sess = tf.InteractiveSession()
init = tf.global_variables_initializer()
sess.run(init)
raw_data = [1., 2., 8., -1., 0., 5.5, 6., 13]
spikes = tf.Variable([False] * len(raw_data), name='spikes')
spikes.initializer.run()
saver = tf.train.Saver()
The text was updated successfully, but these errors were encountered: