Transfer learning

Transfer learning reuses a model pre-trained on a large dataset (for example ImageNet) for a new task. You replace the last layer and train only that one, or the whole network with a small learning rate. It gives good results with little data.

Example

for p in modele.parameters(): p.requires_grad = False
modele.fc = nn.Linear(512, 3)

Related concepts

The whole glossary