FrancescoSaverioZuppichini / glasses

High-quality Neural Networks for Computer Vision 😎
https://francescosaveriozuppichini.github.io/glasses-webapp/
MIT License
436 stars 37 forks source link

Pretrain models, load only some layers #179

Closed FrancescoSaverioZuppichini closed 3 years ago

FrancescoSaverioZuppichini commented 3 years ago

It is convinient to include/exclude some specific block of layers. E.g.


resnet = Resnet.resnet34(in_channels=10, pretrained=True, excluding: lambda m: m.head)
# pretrained resnet with a different stem
FrancescoSaverioZuppichini commented 3 years ago

close by #212