This is in reference to the Code First Introduction to NLP 2019 lessons. I am working with the lesson 7 notebooks on translation and natural text generation. I was wondering if anyone has had some success saving a trained model and using that for inference. I am running into the ff errors/roadblocks and would like if someone can point me in the right direction.
- Error loading saved model on CPU - Error message “AttributeError: Can’t get attribute 'seq2seq_loss’”, seq2seq_loss is the loss function specified in the notebook i’m running. Note: I can load the saved model on a GPU successfully.
- Prediction error - After i use the add_test function to add new data to the learner, i am a little confused on how to proceed with the prediction. I used the pred_acts function from the notebook with dataset type set to Test but it returns this error “TypeError: object of type ‘int’ has no len()”