Giter VIP home page Giter VIP logo

Comments (6)

roip avatar roip commented on May 9, 2024 1

running on a windows machine, change line : saver.save(sess, "spikes.ckpt")
to saver.save(sess, "./spikes.ckpt") resulted in successful save of the checkpoint

from tensorflow-book.

sirusss avatar sirusss commented on May 9, 2024

Same issue (Not found: ; No such file or directory). Apparently, it tries to look for the file before creating it.

from tensorflow-book.

sansmoraxz avatar sansmoraxz commented on May 9, 2024
saver.save(sess, "spikes.ckpt")

This line raises the error:
ValueError: Parent directory of spikes.ckpt doesn't exist, can't save.

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:
saver.save(sess, "train_saves\spikes.ckpt")

from tensorflow-book.

nickdesaulniers avatar nickdesaulniers commented on May 9, 2024

I had to use "./spikes.ckpt"

from tensorflow-book.

tangyong avatar tangyong commented on May 9, 2024

except for "Parent directory of spikes.ckpt doesn't exist", on windows and spyder, the following error happened:

...
shape_and_slices=shape_and_slices, tensors=tensors, name=name)
File "e:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "e:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 3290, in create_op
op_def=op_def)
File "e:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 1654, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

FailedPreconditionError (see above for traceback): Attempting to use uninitialized value Variable
[[Node: save_7/SaveV2 = SaveV2[dtypes=[DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL, DT_BOOL], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save_7/Const_0_0, save_7/SaveV2/tensor_names, save_7/SaveV2/shape_and_slices, Variable, Variable_1, Variable_2, Variable_3, Variable_4, spikes, spikes_1, spikes_2, spikes_3, spikes_4, spikes_5, spikes_6, spikes_7, spikes_8)]]
...

I also doubt this is the spyder's problem because it works on python console.

from tensorflow-book.

tangyong avatar tangyong commented on May 9, 2024

adding the following in spyder has fixed the problem! (including any file eg. loading variable)

tf.reset_default_graph()

from tensorflow-book.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.