squeezenet
model.backbone.torchvision.squeezenet
Fire
Bases: Module
Source code in SaigeToolkit/model/backbone/torchvision/squeezenet.py
SqueezeNet
SqueezeNet(version: str = '1_0', num_classes: int = 1000, dropout: float = 0.5, in_channels: int = 3)
Bases: Module
Source code in SaigeToolkit/model/backbone/torchvision/squeezenet.py
extend_state_dict_input_channel
extend_state_dict_input_channel(state_dict: Mapping[str, Any], input_weight_key: str, input_conv_layer: Conv2d) -> None
(Multipage) 3채널 이상인 이미지를 사용하기 위해 필요한 기능이며, state_dict의 input conv 채널이 네트워크의 input conv 채널보다 작은 경우 해당 weight의 채널을 늘려줍니다. 현재 네트워크가 가진 input conv 웨이트에서 앞 3 채널을 state_dict의 input conv 웨이트로 치환하는 방식을 사용합니다.
Parameters:
-
state_dict(Mapping[str, Any]) –로드하려는 weight
-
input_weight_key(str) –input conv weight의 이름
-
input_conv_layer(Conv2d) –input conv layer
Source code in SaigeToolkit/model/util.py
_squeezenet
_squeezenet(version: str, weights: Optional[WeightsEnum], progress: bool, **kwargs: Any) -> SqueezeNet
Source code in SaigeToolkit/model/backbone/torchvision/squeezenet.py
squeezenet1_0
squeezenet1_0(*, weights: Optional[SqueezeNet1_0_Weights] = None, progress: bool = True, **kwargs: Any) -> SqueezeNet
SqueezeNet model architecture from the SqueezeNet: AlexNet-level
accuracy with 50x fewer parameters and <0.5MB model size
<https://arxiv.org/abs/1602.07360>_ paper.
Parameters:
-
weights–class:
~torchvision.models.SqueezeNet1_0_Weights, optional): The pretrained weights to use. See :class:~torchvision.models.SqueezeNet1_0_Weightsbelow for more details, and possible values. By default, no pre-trained weights are used. -
progress(bool, default:True) –If True, displays a progress bar of the download to stderr. Default is True.
-
**kwargs(Any, default:{}) –parameters passed to the
torchvision.models.squeezenet.SqueezeNetbase class. Please refer to thesource code <https://github.com/pytorch/vision/blob/main/torchvision/models/squeezenet.py>_ for more details about this class.
.. autoclass:: torchvision.models.SqueezeNet1_0_Weights :members:
Source code in SaigeToolkit/model/backbone/torchvision/squeezenet.py
squeezenet1_1
squeezenet1_1(*, weights: Optional[SqueezeNet1_1_Weights] = None, progress: bool = True, **kwargs: Any) -> SqueezeNet
SqueezeNet 1.1 model from the official SqueezeNet repo
<https://github.com/DeepScale/SqueezeNet/tree/master/SqueezeNet_v1.1>_.
SqueezeNet 1.1 has 2.4x less computation and slightly fewer parameters than SqueezeNet 1.0, without sacrificing accuracy.
Parameters:
-
weights–class:
~torchvision.models.SqueezeNet1_1_Weights, optional): The pretrained weights to use. See :class:~torchvision.models.SqueezeNet1_1_Weightsbelow for more details, and possible values. By default, no pre-trained weights are used. -
progress(bool, default:True) –If True, displays a progress bar of the download to stderr. Default is True.
-
**kwargs(Any, default:{}) –parameters passed to the
torchvision.models.squeezenet.SqueezeNetbase class. Please refer to thesource code <https://github.com/pytorch/vision/blob/main/torchvision/models/squeezenet.py>_ for more details about this class.
.. autoclass:: torchvision.models.SqueezeNet1_1_Weights :members: