Skip to content
RED SAGSkills
medium10 pts · first answer countspytorchdeep-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