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

about trained model #7

Open
danielctl opened this issue Jun 18, 2019 · 2 comments
Open

about trained model #7

danielctl opened this issue Jun 18, 2019 · 2 comments

Comments

@danielctl
Copy link

I have already trained and saved checkpoints, but can you show me how to use the checkpoint to use the trained model? Sorry I am new to python and CNN

@Tolkoton
Copy link

If you need to train it more, use load_model. If you need predictions, use model.predict

@danielctl
Copy link
Author

danielctl commented Jun 20, 2019

My problem is: I have train my model and saved checkpoint, but I don't know how to load its checkpoints and use it to predict.

For example, I load the checkpoints

with tf.Session(config=config) as sess:
sess.run(tf.global_variables_initializer())
saver = tf.train.import_meta_graph('checkpoints/stocks_model.ckpt-30001.meta')
saver.restore(sess,tf.train.latest_checkpoint('checkpoints/'))

But how can I use checkpoint result to predict?

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

2 participants