You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The built-in models are really convenient. However, the documentation usually did not specified the expected input dimension, I always find it troublesome to confirm what is the correct input dimension for the model class that i want to use.
Is there clear documentation for this issue? Or is there a simple and clear rule that i can use (e.g., a rule that were used to develop these model class in pytorch that are consistent throughout?)
Suggest a potential alternative/fix
No response
The text was updated successfully, but these errors were encountered:
The documentation mentions the transforms that need to be applied on the image. resnet model has resize transform and crop transforms which ultimately decides the shape of input tensor to the model.
The inference transforms are available at ResNet18_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. The images are resized to resize_size=[256] using interpolation=InterpolationMode.BILINEAR, followed by a central crop of crop_size=[224]. Finally the values are first rescaled to [0.0, 1.0] and then normalized using mean=[0.485, 0.456, 0.406] and std=[0.229, 0.224, 0.225].
📚 The doc issue
The built-in models are really convenient. However, the documentation usually did not specified the expected input dimension, I always find it troublesome to confirm what is the correct input dimension for the model class that i want to use.
For example:
https://pytorch.org/vision/main/models/generated/torchvision.models.resnet18.html
https://pytorch.org/vision/main/models/generated/torchvision.models.swin_t.html
https://pytorch.org/vision/main/models/generated/torchvision.models.video.swin3d_b.html
Is there clear documentation for this issue? Or is there a simple and clear rule that i can use (e.g., a rule that were used to develop these model class in pytorch that are consistent throughout?)
Suggest a potential alternative/fix
No response
The text was updated successfully, but these errors were encountered: