resnet18¶
- torchvision.models.resnet18(*, weights: Optional[ResNet18_Weights] = None, progress: bool = True, **kwargs: Any) ResNet [source]¶
ResNet-18 from Deep Residual Learning for Image Recognition.
- Parameters:
weights (
ResNet18_Weights
, optional) – The pretrained weights to use. SeeResNet18_Weights
below for more details, and possible values. By default, no pre-trained weights are used.progress (bool, optional) – If True, displays a progress bar of the download to stderr. Default is True.
**kwargs – parameters passed to the
torchvision.models.resnet.ResNet
base class. Please refer to the source code for more details about this class.
- class torchvision.models.ResNet18_Weights(value)[source]¶
An enumeration.
Examples using
ResNet18_Weights
:
Examples using
resnet18
: