Currently, as far as I can tell, t2t-trainer only saves model checkpoints. It would be useful if there was a flag which also indicated that a SavedModel should be produced (perhaps by just adding a simple ExportStrategy to the Experiment which is created). This would allow models trained with tensor2tensor to be loaded by things like the TensorFlow Java API bindings. Would this make sense to add?
(Apologies if I'm just misunderstanding something and there's already a way to do this)
Yes! I think we just forgot about SavedModel, it would be very good to add. A PR is more than welcome!
It seems that model export has already implemented.
Yes, done, thanks!
Hi @lukaszkaiser, @belph.
I have exported a frozen graph of the Transformer network.
Now I would like to use it through the Java API.
My problem is that I do not know how to specify the name of the input and output layers here:
Tensor<Double> output = session
.runner()
.feed("input", input)
.fetch("output")
.run()
.get(0)
Most helpful comment
Yes, done, thanks!