Of course, my input size is torch.Size([2, 1, 256, 256])
If I resample with my manual code there is no problem but when it tries to use resample from medicaltorch I got an error like that.
original size is torch.Size([2, 1, 512, 512])
train_transform = transforms.Compose([
        mt_transforms.Resample(1.385, 1.385),
        mt_transforms.ElasticTransform(alpha_range=(40.0, 60.0), sigma_range=(2.5, 4.0), p=0.3),
        mt_transforms.ToTensor(),
       

after resample got torch.Size([2, 1, 256, 256])
and how to avoid the memory leak?
Thank you.