Coder Social home page Coder Social logo

Comments (4)

naturomics avatar naturomics commented on July 18, 2024

Can you describe it in more detail? I don't use any variable save_path in my code. Did you modify something else? Evaluation/Testing function is OK in my computer.

from capsnet-tensorflow.

AlLongley avatar AlLongley commented on July 18, 2024

Have you already run training on the MNIST dataset or downloaded a pre-trained model?

If you run python main.py, it will begin training and save a model every cfg.save_freq epochs (by default 3 as per config.py) and save it into cfg.logdir

A complete logdir folder should contain a file named checkpoint and multiple model_epoch_###_step_## files such as those found in naturomics' Baidu folder ( for which the password can be found on the front github README page, just below the results)

If those files are not in there, you would get an error similar to the one you described.

from capsnet-tensorflow.

kumarlamichhane avatar kumarlamichhane commented on July 18, 2024

I trained my model and it returned me all the losses, val_acc, train_acc..
but then when i run the test by using python main.py --is_training=False or change the is_training to false in config file.... i will get an error

File "main.py", line 137, in <module> tf.app.run() File "/home/xplorer/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 132, in main evaluation(model, sv, num_label) File "main.py", line 97, in evaluation supervisor.saver.restore(sess, tf.train.latest_checkpoint(cfg.logdir)) File "/home/xplorer/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1557, in restore raise ValueError("Can't load save_path when it is None.") ValueError: Can't load save_path when it is None.
however i have events.out.tfevents.1515508371.machinename files and a graph.pbtxt in cfg.logdir.
Any help would be appreciated.
thank you in advance

from capsnet-tensorflow.

kumarlamichhane avatar kumarlamichhane commented on July 18, 2024

Apologies.. for disturbing u good people..
The error was due to not saving the models when required.
the error was due to running the training for 1 epoch and saving the models after 3 epochs.

cfg.save_freq=3 and
cfg.epoch=1 gave me the error

doing

cfg.save_freq=3 and
cfg.epoch=1

solved the problem

I really appreciate your help.

from capsnet-tensorflow.

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.