IndexError: index 4 is out of bounds for dimension 0 with size 4?
I am tying to write a NN in pytorch that learns to give for example: very simple A+B for two images. Writing it, I got this error. my batch_size is 4. class myNet(nn.Module): def __init__(self): super(myNet, self).__init__() self.fc1 = nn.Linear(3072, 3072) # set up FC layer self.fc2 = nn.Linear(3072, 3072) # set up the other… Read More IndexError: index 4 is out of bounds for dimension 0 with size 4?