Solved by Nikronic in post #2 
              
              
                Hi, 
Actually, I don’t know what meter is here but don’t you have typo? 

You defined loss_meter but you are calling loss.meter. loss is a tensor and it does not have meter. 

So, I think last line should be loss_meter.meter.add(loss.item()) 
Bests