ageron / ageron/handson-ml2

[Chapter 16] - Saving the Encocer-Decoder Inference Model

Aberta
#256 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Jupyter Notebook
Estrelas
30k
Forks
13.1k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.