Hello,
I have written a model using the sequential retrieval example guide and I am attempting to save and load the model to test its portability. In the example, the tfrs.Model is sub classed and the init and the compute_loss functions are overridden. I am running into issues attempting to save the model:
- The high level Model.Save() fails because the ‘input shape is not available or because the forward pass of the model is not defined.’
- The same applies to tf.keras.Models.save_model() (which I suppose makes sense as I understand them to be equivalent).
- The tf.saved_model.save(…) does save something, however when I load the model I get a ‘TypeError: ‘_UserObject’ object is not callable’ The model does not appear to be usable.
I would very much appreciate an direction on how to fix this as I have hit a wall.
Anand