I am trying to split my data using “train_test_split” of sklearn, but I got this error
“TypeError: take(): argument ‘index’ (position 1) must be Tensor, not numpy.ndarray”
here is the code:
train_0, X_test, y_train, y_test = train_test_split(zero_cond, data_labels, test_size=0.5)
====
Type of data:
print(zero_cond.type())
torch.FloatTensor
print(data_labels.type())
torch.LongTensor