[Chapter 16] - Saving the Encocer-Decoder Inference Model
- Dominant language
- Jupyter Notebook
- Stars
- 30k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi to all,
I just wondered whether or not there is an easy way to save the inference model from the third and fourth version of the seq2seq example.
Using a simple inference_model.save() will return with an error:
> AssertionError: Tried to export a function which references untracked object Tensor("10865:0", shape=(), dtype=resource).TensorFlow objects (e.g. tf.Variable) captured by functions must be tracked by assigning them to an attribute of a tracked object or assigned to an attribute of the main object directly.
This is connected to the GreedyEmbeddingSampler. And yes, I tried to find a solution already, but nothing seems to work. Besides, I got the feeling that I am missing an important point here.
I know, that I always can save the training model and reconstruct the inference model from its weights during runtime. But this seems cumbersome.
Anybody got any ideas?
And sorry, if this is not the right channel to ask this question.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.