

These weights improve upon the results of the original paper by using a modified version of TorchVision’s

Finally the values are first rescaled to and then normalized using mean= and std=. The images are resized to resize_size= using interpolation=InterpolationMode.BILINEAR, followed by a central crop of crop_size=. The inference transforms are available at MobileNet_V2_Weights.IMAGENET1K_V1.transforms and perform the following preprocessing operations: Accepts PIL.Image, batched (B, C, H, W) and single (C, H, W) image torch.Tensor objects. Tench, goldfish, great white shark, … (997 omitted) These weights reproduce closely the results of the paper using a simple training (on (on ImageNet-1K) weights='DEFAULT' or weights='IMAGENET1K_V1'. MobileNet_V2_Weights.DEFAULT is equivalent to MobileNet_V2_Weights.IMAGENET1K_V2. The model builder above accepts the following values as the weights parameter. Please refer to the source codeĬlass torchvision.models. **kwargs – parameters passed to the 2īase class. Progress ( bool, optional) – If True, displays a progress bar of the Weights ( MobileNet_V2_Weights, optional) – The MobileNetV2 architecture from the MobileNetV2: Inverted Residuals and Linear mobilenet_v2 ( *, weights : Optional = None, progress : bool = True, ** kwargs : Any ) → MobileNetV2 ¶
