@ptrblck sir my Y_train shape is (3441,), is this the problem? If yes what to do:
also when I run your code on my class dataset it says:
slice() cannot be applied to a 0-dim tensor. in line (in class Dataset)
return torch.FloatTensor(this.X[idx]), torch.LongTensor(this.y[idx])
I have changed the numpy array into tensor using this:
X_test=torch.from_numpy(X_test)

then I got an error in line:
return torch.FloatTensor(this.X[idx]), torch.LongTensor(this.y[idx])
TypeError: expected Float (got Double)
Sir plz tell me if I need to share the model also. I think the whole problem is in loading the dataset .
Regards