Where am I chaniging the batch size? In the first Layer of the NN?
flatten(x) and x.view(x.size(0), -1) have different results, was either just a “non-working” hint or am I missing something?
>>> flatten(features).shape
torch.Size([1051200])

>>> features.view(features.size(0), -1).shape
torch.Size([4, 262800])

>>> features.view(-1).shape
torch.Size([1051200])

what am I trying to accomplish currently?
the input of the forward function needs to be 1D, and my first attempt was better



 poe:

I want the input to be of shape torch.Size([35040, 30]) rather torch.Size([3, 8760, 30])


but still wrong, and should be
y_pred = model.forward(flatten(feature).float())

right?
self.l0 = nn.Linear(numberOfFeatures*batchSize, 30)
self.l1 = nn.Linear(30, 30)
self.l2 = nn.Linear(30, 30)
self.l3 = nn.Linear(numberOfFeatures, 1)

works up to the function
criterion(y_pred.squeeze(), target)

because (my guess) the flattened input of 300 values does not correspond with the 10 target values, causing the following error:
ValueError: Target size (torch.Size([10])) must be the same as input size (torch.Size([]))

the question is, where and how do I change the target size?