I have tried the keras nmt code in the following link:https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/eager/python/examples/nmt_with_attention/nmt_with_attention.ipynb
But when I tried to save the model, I get a NotImplementedError:
File "m.py", line 310, in <module> main() File "m.py", line 244, in main encoder.save('/home/zzj/temp/encoder.h5') File "/home/zzj/tensorflow/lib/python3.5/site-packages/tensorflow/python/keras/engine/network.py", line 1218, in save raise NotImplementedError The Encoder,Decoder subclassed the tf.keras.Model, and tf.keras.Model is a subclass of Network. After reading the code in https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/keras/engine/network.py
I found that these two class's _is_graph_network became False. I tried to set the flag to be true but get another error. So how can I save the model the author defined in the code?