What is the difference between parameters and children?
It looks like parameters and children show the same info, so what is the difference between them?

import torch

print('torch.__version__', torch.__version__)

m = torch.load('imagenet_resnet18.pth')

print(m.parameters)
print(m.children)



model.parameters() is a generator that returns tensors containing your model parameters.
model.children() is a generator that returns layers of the model from which you can extract your parameter tensors using &lt;layername&gt;.weight or &lt;layername&gt;.bias


Visit this link for a simple tutorial on accessing and freezing model layers.
