1
$\begingroup$

in this pytorch tutorial, there is transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]), what is the purpose of this?

(i removed it and the code still works)

$\endgroup$

1 Answer 1

1
$\begingroup$

Those are mean and standard deviation used to standardize each channel of the images from IMAGENET used to train the torchvision pretrained models.

Since the models were trained using this preprocessing step, it is useful to apply it also when using those models for transfer learning on new data.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .