I am working on multi-class segmentation.
I tried to equalize height and width, but I could’t because “it is invalid for input of size”:
I think, what my problem is about defining train_y.  I am new these concepts, I kind of did bungee jumping into deep learning. So I am missing very fundamental things, I suppose.
here is my previously defined train_y and train_x :
tdata = np.load("D:\\Neural_Networks\\coursera_v3\\coursera\\training_data.npy", allow_pickle=True)
# print(len(training_data))


X = torch.Tensor([i[0] for i in training_data]).view(-1, 64, 64)
X = X / 255.0
y = torch.Tensor([i[1] for i in training_data])

VAL_PCT = 0.1
val_size = int(len(X) * VAL_PCT)
print(val_size)

train_X = X[:-val_size]
train_y = y[:-val_size]

# test_X = X[:-val_size]
# test_y = y[:-val_size]
train_y = train_y.long()

>  train_X.size()
>  torch.Size([33748, 64, 64])
>  train_y.size()
>  torch.Size([8750, 2])

By the way, data is images of dogs:
> training_data.size
> Out[6]: 24998
> training_data.ndim
> Out[7]: 2

/// Note: I think, it was a mistake trying to convert from a CNN architecture  ; data was set for that one.   Yet, it is a good practice and I am stuck. Thank you.