How to load a SavedModel into an Estimator?

250 views
Skip to first unread message

Bandido brazo

unread,
Jan 24, 2018, 7:08:50 AM1/24/18
to Discuss
How can I load a SaveModel that I got using export_savedmodel() back into the Estimator? My use case is very similar to this question on Stack Overflow. As noted in the question, passing a SessionRunHook into the hooks argument of train does not work.

Magnus Hyttsten

unread,
Jan 24, 2018, 3:38:36 PM1/24/18
to Bandido brazo, Discuss
For now, you should check out tf.contrib.predictor.from_saved_model. This allows you to call predict method.

Observe that you export to a SavedModel so you can't do eval or train from one. If you want to continue training, you should simply rely on the checkpoint files saved the Estimators as part of the model_dir you specify.

On Wed, Jan 24, 2018 at 4:08 AM Bandido brazo <714...@gmail.com> wrote:
How can I load a SaveModel that I got using export_savedmodel() back into the Estimator? My use case is very similar to this question on Stack Overflow. As noted in the question, passing a SessionRunHook into the hooks argument of train does not work.

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/7b871f34-2b61-4ccb-9878-f3535e20ef6f%40tensorflow.org.

Bandido brazo

unread,
Jan 27, 2018, 6:46:26 AM1/27/18
to Discuss
Thank you for the suggestion. This solved my problem.
Reply all
Reply to author
Forward
0 new messages