I am running the imagenet exampe in pytorch.

However, I don’t understand the meaning of data_time.val and data_time.avg. Even the loss.val and loss.avg.

Any one can help me understand it ?

I am running the imagenet exampe in pytorch.

However, I don’t understand the meaning of data_time.val and data_time.avg. Even the loss.val and loss.avg.

Any one can help me understand it ?

`data_time`

, `losses`

etc are of type

```
class AverageMeter(object):
"""Computes and stores the average and current value"""
def __init__(self):
self.reset()
def reset(self):
self.val = 0
self.avg = 0
self.sum = 0
self.count = 0
def update(self, val, n=1):
self.val = val
self.sum += val * n
self.count += n
self.avg = self.sum / self.count
```

It’s thus just used to compute and store some statistics, e.g. about the loss.

It’s being updated e.g. in these lines: https://github.com/pytorch/examples/blob/master/imagenet/main.py#L199

3 Likes

Cool.

I understand it. Thank you