How to create Keras's encoder-decoder model's endpoint?

0

Hi,
I'm just started to use sagemaker.
Now, I'm testing encoder-decoder model for regression.
The model is coded in Sagemaker's script mode, and finished learning on a Jupyter notebook.

The learning code is written by keras + tensorflow, and the model is based on the encoder decoder model. It is similar to the Keras's seq2seq example linked below.
Below, I will take this as an example.
https://keras.io/examples/lstm_seq2seq/

In the above model, there are "encoder_model" and "decoder_model" apart from "model" to be trained, and in the inference, "encoder_model" and "decoder_model" are used to generate the prediction by the function "decode_sequence (input_seq)".
I would like to deploy this function "decode_sequence (input_seq)" as an endpoint, but it doesn't work as usual with estimator.deploy () and I don't know how to implement it.

Is there any sample code or resources to solve this?
Thanks in advance.

steve13
已提问 5 年前241 查看次数
1 回答
0

Thanks, the problem was self resolved.
What should I do was to code "decode sequence" withint the "keras_model_fn".

steve13
已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则