Hello!
I have dataset where: data 23761 x 13 , labels 23761 x 1 loaded by DataLoader
My net:
class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.fc1 = nn.Linear(13, 13)
        self.fc2 = nn.Linear(13, 2)

    def forward(self,x):
        x = F.relu(self.fc1(x))
        x = self.fc2(x)
        return F.logsigmoid(x)

net = Net()
criterion = nn.CrossEntropyLoss()

carset = carDataset()
train_loader = torch.utils.data.DataLoader(carset, batch_size = 10, shuffle = True )

for epoch in range(epochs):
   running_loss = 0
   for features, labels in train_loader:
       output = net(features)
       labels = labels.squeeze()
       loss = criterion(output, labels)
       optimizer.zero_grad()
       loss.backward()
       optimizer.step()

       running_loss += loss.item()

   print(loss.item())

When I put batch_size = 10 or  batch_size = 20 it throws:
Traceback (most recent call last):
  File "nn.py", line 75, in <module>
    loss = criterion(output, labels)
 
    if input.size(0) != target.size(0):
IndexError: dimension specified as 0 but tensor has no dimensions

When I make in 64 it works normally and I have results.
My labels have 2 classes: 0 or 1.
Whats wrong with it ?