hi Ptrblck,
I am loading the data from a local npy file:
hi P
train_array=np.load(‘load_directory’)
x_train=train_array.transpose([2,0,1]).reshape(42000,2048)
X_train=torch.Tensor(X_train)
y_train=np.arange(1,42001,1)
y_train=y_train.reshape(42000,1)
y_train=torch.from_numpy(y_train)
train_dataset = TensorDataset(X_train, y_train)
train_dataset2 = DataLoader(train_dataset, batch_size=BATCHSIZE, shuffle=True)
I was having trouble with this and I don’t understand why (though when i look at the data it says its a tensor)