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

There is no restoreHyperParameters function in the sample.py #32

Closed
WestbrookZero opened this issue Apr 11, 2017 · 6 comments
Closed

There is no restoreHyperParameters function in the sample.py #32

WestbrookZero opened this issue Apr 11, 2017 · 6 comments

Comments

@WestbrookZero
Copy link

There is no restoreHyperParameters function in the sample.py
def loadModel(session, vocab_size):
hParams = restoreHyperParameters()
model = models.sentiment.SentimentModel(int(hParams[0]), int(hParams[1]),
float(hParams[2]), int(hParams[3]), int(hParams[4]), int(hParams[5]),
float(hParams[6]),float(hParams[7]) ,True)
ckpt = tf.train.get_checkpoint_state(FLAGS.checkpoint_dir)
if ckpt and gfile.Exists(ckpt.model_checkpoint_path):
print ("Reading model parameters from {0}".format(ckpt.model_checkpoint_path))
model.saver.restore(session, ckpt.model_checkpoint_path)
else:
print ("Double check you got the checkpoint_dir right...")
print ("Model not found...")
model = None
return model

@domerin0
Copy link
Owner

Are you saying that it gives you an error that the function is not found?

@WestbrookZero
Copy link
Author

yea

@SafatMahmood
Copy link

I can not run the sample.py either....

its saying Double check you got the checkpoint_dir right...
Model not found..

but dir is perfect.Help please

@domerin0
Copy link
Owner

I've been away on a trip. I'll be back Monday, and can take more of a look at this then. Someone else had this problem, but wasnt using Ubuntu. You may also want to check there isn't a problem with your tensorflow installation.

@domerin0
Copy link
Owner

Ok, I'm back from my trip. Hey @WestbrookZero and @SafatMahmood, what are your versions of TensorFlow and python, and what OS are you using?

@domerin0
Copy link
Owner

I'm closing this issue for now, I've updated the project to work with the latest tensorflow version. If this issue comes up still, feel free to reopen this. If you do, make sure to let me know which: python, tensorflow, and os you are using.

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

No branches or pull requests

3 participants