zennit.torchvision
Specialized Canonizers for models from torchvision.
Classes
Canonizer specifically for BasicBlocks of torchvision.models.resnet* type models. |
|
Canonizer specifically for Bottlenecks of torchvision.models.resnet* type models. |
|
Canonizer for torchvision.models.resnet* type models. |
|
Canonizer for torchvision.models.vgg* type models. |
- class zennit.torchvision.ResNetBasicBlockCanonizer[source]
Bases:
AttributeCanonizer
Canonizer specifically for BasicBlocks of torchvision.models.resnet* type models.
- class zennit.torchvision.ResNetBottleneckCanonizer[source]
Bases:
AttributeCanonizer
Canonizer specifically for Bottlenecks of torchvision.models.resnet* type models.
- class zennit.torchvision.ResNetCanonizer[source]
Bases:
CompositeCanonizer
Canonizer for torchvision.models.resnet* type models. This applies SequentialMergeBatchNorm, as well as add a Sum module to the Bottleneck modules and overload their forward method to use the Sum module instead of simply adding two tensors, such that forward and backward hooks may be applied.
- class zennit.torchvision.VGGCanonizer[source]
Bases:
SequentialMergeBatchNorm
Canonizer for torchvision.models.vgg* type models. This is so far identical to a SequentialMergeBatchNorm