Creating Tensor from Numpy Array

I have a dataset that has one feature, a flatten Numpy array of accelerometer readings for each second. The shape of each entry is (300, ).

The label is 0, 1, 2, 3 based on speed.

When I try to create TensorDataset I receive an error,
TypeError: 'numpy.int64' object is not callable
sample

how can I load my dataset into TorchDataset?

Could you try to create a tensor first via:

data = torch.from_numpy(numpy_arr)

If you are still stuck, could you post the code, which creates this error, please?

I tried that but it didn’t worked. Then I stretched the numpy arrray into columns and used it.

Thank you!!!