捷徑

regnet_y_400mf

torchvision.models.regnet_y_400mf(*, weights: Optional[RegNet_Y_400MF_Weights] = None, progress: bool = True, **kwargs: Any) RegNet[原始碼]

Designing Network Design Spaces 建構 RegNetY_400MF 架構。

參數:
  • weights (RegNet_Y_400MF_Weights, optional) – 要使用的預訓練權重。 有關更多詳細資訊和可能的值,請參閱下面的 RegNet_Y_400MF_Weights 。 預設情況下,不使用預訓練權重。

  • progress (bool, optional) – 如果為 True,則會顯示下載到 stderr 的進度條。 預設值為 True。

  • **kwargs – 傳遞給 torchvision.models.regnet.RegNettorchvision.models.regnet.BlockParams 類的參數。 請參閱 原始碼 以獲取有關這些類的更多詳細資訊。

class torchvision.models.RegNet_Y_400MF_Weights(value)[原始碼]

上面的模型建構器接受以下值作為 weights 參數。RegNet_Y_400MF_Weights.DEFAULT 等同於 RegNet_Y_400MF_Weights.IMAGENET1K_V2。您也可以使用字串,例如 weights='DEFAULT'weights='IMAGENET1K_V1'

RegNet_Y_400MF_Weights.IMAGENET1K_V1:

這些權重使用簡單的訓練方法,能緊密重現論文中的結果。

acc@1 (在 ImageNet-1K 上)

74.046

acc@5 (在 ImageNet-1K 上)

91.716

min_size

height=1, width=1

categories

tench, goldfish, great white shark, … (省略 997 個)

num_params

4344144

recipe

link

GFLOPS

0.40

File size

16.8 MB

推論轉換可在 RegNet_Y_400MF_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] 進行正規化。

RegNet_Y_400MF_Weights.IMAGENET1K_V2:

這些權重透過使用 TorchVision 修改版本的新訓練方法,改善了原始論文的結果。也可作為 RegNet_Y_400MF_Weights.DEFAULT 使用。

acc@1 (在 ImageNet-1K 上)

75.804

acc@5 (在 ImageNet-1K 上)

92.742

min_size

height=1, width=1

categories

tench, goldfish, great white shark, … (省略 997 個)

num_params

4344144

recipe

link

GFLOPS

0.40

File size

16.8 MB

推論轉換可在 RegNet_Y_400MF_Weights.IMAGENET1K_V2.transforms 中找到,並執行以下預處理操作: 接受 PIL.Image、批次 (B, C, H, W) 和單個 (C, H, W) 影像 torch.Tensor 物件。影像會使用 interpolation=InterpolationMode.BILINEAR 調整大小為 resize_size=[232],然後進行 crop_size=[224] 的中心裁剪。最後,這些值首先會重新縮放到 [0.0, 1.0],然後使用 mean=[0.485, 0.456, 0.406]std=[0.229, 0.224, 0.225] 進行正規化。

文件

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources