while using a pretrained model given by the author I evaluated with my code and I am able to get the same accuracy as they prescribe, but now when I train the model and then calculate the accuracy by setting it to model.train() and using the same evaluation dataset, I get less accuracy but not too worse . The only difference i made is setting to model.train() and commenting with torch.no_grad().
Note: I did not do optimizer.step() in train method. I just ran the same code as in evaluation script in my train script and just changed those two lines.