maciejkula / spotlight

Deep recommender models using PyTorch.
MIT License
3k stars 428 forks source link

Is there a way to manually set seq model mode? #154

Open cailurus opened 5 years ago

cailurus commented 5 years ago

I'd like to eval the NN model every epoch:

model = ImplicitSequenceModel(xxx, n_iter=1)

for _ in range(10):
    model.fit(train, verbose=True)
    sequence_precision_recall_score(model, test) # after I added this, internal PyTorch model changed to eval mode. So can I added a line to switch the internal model to train mode again?
maciejkula commented 5 years ago

Can you post the error you see?