Dataloader for importing 1D signal (EGG)

HI everyone

I have a data set size of [65536,1,94] , it is a tensor that 65555 is number of my data , 1 is channel number and 94 is length of the signal. My data is a not a pic, its like a signal.

I would like to use dataloader like this due to device my data to 32 epochs and 2048 batch size.
is this the right way of doing that:
num_epochs = 32
batch_size = 2048
dataloader = DataLoader(data, batch_size=batch_size)

thank you

Your code should work.
Generally I would recommend to create a custom Dataset (where you can use transformations etc.) or pass your tensors to a TensorDataset.
However, in your simple example, it should work nevertheless to pass the data tensor directly to the DataLoader.

1 Like