Answer the question
In order to leave comments, you need to log in
How to save a model in Pytorch similar to saving a model in Tensorflow?
I need to save the pytorch model for subsequent prediction on new data, in order to load the model and use it in the same way as it is in tensorflow:
model = keras.models.load_model('path/to/location')
prediction = model.predict(my_new_record)
model = torch.load('model.pt')
prediction = model(my_new_record)
TypeError: 'collections.OrderedDict' object is not callable
model.eval()
AttributeError: 'collections.OrderedDict' object has no attribute 'eval'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question