Models and pre-trained weights - PyTorch
pytorch.org › vision › masterModels and pre-trained weights¶. The torchvision.models subpackage contains definitions of models for addressing different tasks, including: image classification, pixelwise semantic segmentation, object detection, instance segmentation, person keypoint detection, video classification, and optical flow.
AlexNet | PyTorch
https://pytorch.org/hub/pytorch_vision_alexnetimport torch model = torch. hub. load ('pytorch/vision:v0.10.0', 'alexnet', pretrained = True) model. eval () All pre-trained models expect input images normalized in the same way, i.e. mini-batches of 3-channel RGB images of shape (3 x H x W) , where H and W are expected to be at least 224 .
Densenet | PyTorch
https://pytorch.org/hub/pytorch_vision_densenetAll pre-trained models expect input images normalized in the same way, i.e. mini-batches of 3-channel RGB images of shape (3 x H x W), where H and W are expected to be at least 224.The images have to be loaded in to a range of [0, 1] and then normalized using mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225].. Here’s a sample execution.
torchvision.models — Torchvision 0.8.1 documentation
pytorch.org › vision › 0torchvision.models.shufflenet_v2_x1_0(pretrained=False, progress=True, **kwargs) [source] Constructs a ShuffleNetV2 with 1.0x output channels, as described in “ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design”. Parameters: pretrained ( bool) – If True, returns a model pre-trained on ImageNet.