mobilenet_v3_small¶
- torchvision.models.mobilenet_v3_small(*, weights: Optional[MobileNet_V3_Small_Weights] = None, progress: bool = True, **kwargs: Any) MobileNetV3[source]¶
从 Searching for MobileNetV3 构建一个小的 MobileNetV3 架构。
- 参数:
weights (
MobileNet_V3_Small_Weights, optional) – 要使用的预训练权重。 有关更多详细信息和可能的值,请参阅下面的MobileNet_V3_Small_Weights。 默认情况下,不使用预训练权重。progress (bool, optional) – 如果为 True,则在 stderr 上显示下载的进度条。 默认为 True。
**kwargs – 传递给
torchvision.models.mobilenet.MobileNetV3基类的参数。 有关此类别的更多详细信息,请参阅源代码。
- class torchvision.models.MobileNet_V3_Small_Weights(value)[source]¶
上面的模型构建器接受以下值作为
weights参数。MobileNet_V3_Small_Weights.DEFAULT等同于MobileNet_V3_Small_Weights.IMAGENET1K_V1。 您还可以使用字符串,例如weights='DEFAULT'或weights='IMAGENET1K_V1'。MobileNet_V3_Small_Weights.IMAGENET1K_V1:
这些权重通过使用简单的训练配方改进了原始论文的结果。 也可用作
MobileNet_V3_Small_Weights.DEFAULT。acc@1 (在 ImageNet-1K 上)
67.668
acc@5 (在 ImageNet-1K 上)
87.402
min_size
height=1, width=1
类别
丁鲷, 金鱼, 大白鲨, … (省略 997 个)
num_params
2542856
配方
GFLOPS
0.06
文件大小
9.8 MB
推理变换可在
MobileNet_V3_Small_Weights.IMAGENET1K_V1.transforms中找到,并执行以下预处理操作: 接受PIL.Image、批量(B, C, H, W)和单个(C, H, W)图像torch.Tensor对象。 图像使用interpolation=InterpolationMode.BILINEAR调整大小为resize_size=[256],然后进行中心裁剪,裁剪大小为crop_size=[224]。 最后,值首先重新缩放到[0.0, 1.0],然后使用mean=[0.485, 0.456, 0.406]和std=[0.229, 0.224, 0.225]进行标准化。