-
Notifications
You must be signed in to change notification settings - Fork 257
Open
Description
Hello Ben - how can we remove the data augmentation step in your ResNet example? I need to pass the entire image in the training (no cropping).
I tried to modify the variables train_transforms and test_transforms to remove the rotation, horizontal flip and cropping, thus keeping only .Resize(), .ToTensor() and Normalize() in these variables. So the only thing I've modified in your script is:
train_transforms = transforms.Compose([
transforms.Resize(pretrained_size),
transforms.ToTensor(),
transforms.Normalize(mean = pretrained_means,
std = pretrained_stds)
])
test_transforms = transforms.Compose([
transforms.Resize(pretrained_size),
transforms.ToTensor(),
transforms.Normalize(mean = pretrained_means,
std = pretrained_stds)
])
But then when triggering the training loop, I get this error message:
invalid argument 0: Sizes of tensors must match except in dimension 0. Got 630 and 513 in dimension 3 at /opt/conda/conda-bld/pytorch_1579022060824/work/aten/src/TH/generic/THTensor.cpp:612
Any idea how to fix that?
Many thanks
Metadata
Metadata
Assignees
Labels
No labels