Thanks but last question about this
inference_transform = T.Compose(
    [
        T.Resize(256),
        T.ToTensor(),
        T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),  # Imagenet
    ]
)

i got problem with size of images as i got
>  return torch._C._nn.gelu(input)
> RuntimeError: CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 5.80 GiB total capacity; 3.83 GiB already allocated; 16.50 MiB free; 4.01 GiB reserved in total by PyTorch)

when i changed

T.Resize(256)

to

T.Resize((224,224))

another image have a problem . is there any setting for all images