Hi,
Actually, I don’t know what meter is here but don’t you have typo?



 tianle-BigRice:

loss_meter = meter.AverageValueMeter()


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



 tianle-BigRice:

loss.meter.add(loss.item())


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