tf.keras.Model save: “AssertionError: Tried to export a function which references untracked object Tensor”
问题 I'm running this Tensorflow NMT tutorial: https://github.com/tensorflow/addons/blob/master/docs/tutorials/networks_seq2seq_nmt.ipynb When I try to save the decoder: decoder.save('decoder') , I get: AssertionError: Tried to export a function which references untracked object Tensor("LuongAttention/memory_layer/Tensordot:0", shape=(1024, 23, 256), dtype=float32).TensorFlow objects (e.g. tf.Variable) captured by functions must be tracked by assigning them to an attribute of a tracked object or