Skip to content
RED SAG Skills
mediumStudy question · answer published in Deep Learning interview questions, so no pointspytorchdeep-learning

Different results every inference run

A PyTorch model gives slightly different predictions each time you run it on the same input, and validation accuracy is lower than expected. The model has dropout and batch norm layers. What did you most likely forget?

model.load_state_dict(torch.load("model.pt"))
with torch.no_grad():
    preds = model(x_val)
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions