Thanks for the code.
nn.CrossEntropyLoss expects a multi-class target (not multi-label target, where each sample can belong to more than a single class).
In your case, you should provide the target as:
X = np.random.rand(4000,1100).astype('float32')
y = np.random.randint(0,5,size=(4000,)).astype('long')
train_ds = TensorDataset(torch.from_numpy(X[:-800]).unsqueeze(-1), torch.from_numpy(y[:-800]))
valid_ds = TensorDataset(torch.from_numpy(X[-800:]).unsqueeze(-1), torch.from_numpy(y[-800:]))