Git Product home page Git Product logo

Comments (7)

adisri2694 avatar adisri2694 commented on August 22, 2024

i tried this code
with tf.Session() as sess:
model = MY_Model(sess, len(vocab_embed_object.vocab_dict)-2)
selected_modelpath="./pretrained/model.ckpt.epoch-11"
print("Reading model parameters from %s" % selected_modelpath)
model.saver.restore(sess, selected_modelpath)
print("Model loaded.")

got this error

Unable to open table file ./pretrained/model.ckpt.epoch-11: Data loss: block checksum mismatch: perhaps your file is in a different file format and you need to use a different restore operator?

using python 2 and tensorflow 0.10.0rc0

from refresh.

ShirleyHan6 avatar ShirleyHan6 commented on August 22, 2024

You could use the author's code for loading the model. It works for me with python2 and tensorflow 0.10.0

from refresh.

adisri2694 avatar adisri2694 commented on August 22, 2024

from refresh.

ShirleyHan6 avatar ShirleyHan6 commented on August 22, 2024

I did used the author's code and only changed the directory name for the pre-trained model folder etc.

Are you running this on Windows? It seems that weird errors could occur with tensorflow on Windows.
Can you try to create a virtual environment then install the dependencies.

from refresh.

ShirleyHan6 avatar ShirleyHan6 commented on August 22, 2024

Can you try tensorflow 0.12 instead of 0.10.0rc0?

Check this link also: https://stackoverflow.com/questions/41048819/how-to-restore-a-model-by-filename-in-tensorflow-r12

from refresh.

adisri2694 avatar adisri2694 commented on August 22, 2024

turns out that the model file was not uploaded correctly on the instance,worked fine after reuploading .Thanks for the help

from refresh.

shashiongithub avatar shashiongithub commented on August 22, 2024

Thanks for helping one another guys. I have been a bit busy with the move.

from refresh.

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.