-
Notifications
You must be signed in to change notification settings - Fork 22
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
Comments
Are you saying that it gives you an error that the function is not found? |
yea |
I can not run the sample.py either.... its saying Double check you got the checkpoint_dir right... but dir is perfect.Help please |
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. |
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? |
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. |
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
The text was updated successfully, but these errors were encountered: