Hi! I am new to PyTorch and I get this error when trying to create my first CNN:
Screenshot 2020-08-25 at 16.14.571022×54 11.6 KB
I presume my tensors are of different shapes so hence the error right? How can I make tensors of equal size while preserving the 3 channels?
This is the simple model I was trying to run:
simple_model = nn.Sequential(nn.Conv2d(in_channels = 3,out_channels = 8,
kernel_size = 3, stride = 1, padding = 1),
nn.MaxPool2d(2,2))
for image, label in train_dl:
out = simple_model(image)
print(out.shape)
break
Thanks!