Hello, im having an hard time doing a simple time series classification using pytorch:

x = torch.randn(100, 5, requires_grad=true)
y = torch.empty(100, dtype=torch.long).random_(2)

trainBa = torch.utils.data.DataLoader(dataset=[x,y],
										  batch_size=10,
										  shuffle=true)

model = nn.Sequential(nn.Linear(100, 400),
                      nn.ReLU(),
                      nn.Linear(400, 1),
                      nn.LogSoftmax(dim=0)).to(device)


optimizer = optim.Adam(model.parameters(), lr=0.001)

for epoch in 1:10
        for (i_batch, (z,y)) in enumerate(trainBa)
            (z, y) = z.to(device), y.to(device)

            o = model(z)
			
            loss = nn.CrossEntropyLoss((o,2), y)

            optimizer.zero_grad()
            loss.backward()
            optimizer.step()
          
        end
      
    end

trainBa = torch.utils.data.DataLoader(dataset=[x,y], batch_size=10,shuffle=true)

i get error in:

RuntimeError('stack expects each tensor to be equal size, but got [100] at entry 0 and [100, 5] at entry 1',)
  File "/home/klop/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
    data = self._next_data()
  File "/home/klop/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/home/klop/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
    return self.collate_fn(data)
  File "/home/klop/.local/lib/python3.6/site-packages/torch/utils/data/_utils/collate.py", line 55, in default_collate
    return torch.stack(batch, 0, out=out)