Thanks for your reply.



 mailcorahul:

Are you saying that given a fixed data and a fixed model, you get different outputs on every different forward pass?


Yes, it’s incredible, but the output of the model does have small fluctuations.



 mailcorahul:

To answer the dropout part, yes  model.eval()  is necessary to turn off dropout during inference.


Yes, but it doesn’t seem to work.



 mailcorahul:

Can you see if the model is loaded in the first place and that there are no random initialization of params during every forward pass?



I’m sorry, I don’t know what means that the model is loaded in the first place.
I save and load the model like:

# save
path_save_model = os.path.join('model', 'weight_{epoch}.pth'.format(epoch=(epoch + 1)))
torch.save(model.state_dict(), path_save_model)

# load
model = Model()
model.to(device=args.device)
model.load_state_dict(torch.load(args.weight_path))
criterion_reduction_none = nn.CrossEntropyLoss(reduction='none')
model.eval()


The model is just a simple CNN, even there is no fully connection layer.
I’m sure there is NO random initialization of params during every forward pass.