SKNet¶
The ResNet model is based on the "Selective Kernel Networks" paper.
Architecture overview¶
This paper revisits the concept of having a dynamic receptive field selection in convolutional blocks.

The key takeaways from the paper are the following:
- performs convolutions with multiple kernel sizes
- implements a cross-channel attention mechanism
Model builders¶
The following model builders can be used to instantiate a SKNet model, with or
without pre-trained weights. All the model builders internally rely on the
ResNet base class.
sknet50
¶
sknet50(pretrained: bool = False, checkpoint: Checkpoint | None = None, progress: bool = True, **kwargs: Any) -> ResNet
SKNet-50 from "Selective Kernel Networks"
| PARAMETER | DESCRIPTION |
|---|---|
pretrained
|
If True, returns a model pre-trained on ImageNet
TYPE:
|
checkpoint
|
If specified, the model's parameters will be set to the checkpoint's values
TYPE:
|
progress
|
If True, displays a progress bar of the download to stderr
TYPE:
|
kwargs
|
keyword args of
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ResNet
|
classification model |
SKNet50_Checkpoint
¶
Bases: Enum
IMAGENETTE
class-attribute
instance-attribute
¶
IMAGENETTE = _checkpoint(arch='sknet50', url='https://github.com/frgfm/Holocron/releases/download/v0.2.1/sknet50_224-e2349031.pth', acc1=0.9437, acc5=0.9954, sha256='e2349031c838a4661cd729dbc7825605c9e0c966bd89bbcc9b39f0e324894d1f', size=141253623, num_params=35224394, commit='6e32c5b578711a2ef3731a8f8c61760ed9f03e58', train_args='./imagenette2-320/ --arch sknet50 --batch-size 64 --mixup-alpha 0.2 --amp --device 0 --epochs 100 --lr 1e-3 --label-smoothing 0.1 --random-erase 0.1 --train-crop-size 176 --val-resize-size 232 --opt adamw --weight-decay 5e-2')
Source code in holocron/models/classification/sknet.py
sknet101
¶
sknet101(pretrained: bool = False, checkpoint: Checkpoint | None = None, progress: bool = True, **kwargs: Any) -> ResNet
SKNet-101 from "Selective Kernel Networks"
| PARAMETER | DESCRIPTION |
|---|---|
pretrained
|
If True, returns a model pre-trained on ImageNet
TYPE:
|
checkpoint
|
If specified, the model's parameters will be set to the checkpoint's values
TYPE:
|
progress
|
If True, displays a progress bar of the download to stderr
TYPE:
|
kwargs
|
keyword args of
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ResNet
|
classification model |
Source code in holocron/models/classification/sknet.py
sknet152
¶
sknet152(pretrained: bool = False, checkpoint: Checkpoint | None = None, progress: bool = True, **kwargs: Any) -> ResNet
SKNet-152 from "Selective Kernel Networks"
| PARAMETER | DESCRIPTION |
|---|---|
pretrained
|
If True, returns a model pre-trained on ImageNet
TYPE:
|
checkpoint
|
If specified, the model's parameters will be set to the checkpoint's values
TYPE:
|
progress
|
If True, displays a progress bar of the download to stderr
TYPE:
|
kwargs
|
keyword args of
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ResNet
|
classification model |