How to save variables in hard-disk to use them in pytorch dataloader?

Hi all,
Sir I am using an online available code for my data. But its showing out of memory message everywhere, on my machine, kaggle GPU and google colab. The author suggested to

" Process the data and save it on the hard disk and create [pytorch dataloader]"

I have got the processed data as

Shape of X_train: (3441, 7, 1, 128, 128)
Shape of X_val: (143, 7, 1, 128, 128)
Shape of X_test: (150, 7, 1, 128, 128)

Now plz can someone guide how to use pytorch dataloader here, or If he meant to save these variables from python to my hard disk then only I can use dalaloader.
plz guide.

For reference, you can take a look at Datasets & Dataloaders — PyTorch Tutorials 1.8.1+cu102 documentation or other repos like vision/torchvision/datasets at master · pytorch/vision · GitHub
Also, can you post a code snippet to better understand the problem?

1 Like

I have modified few things like Dataset for pytorchdataloader, so I am reframing the question again, in another question.

Can you please link the another question you are referring to?

@ejguan Actually I dont know the correct way so just copied the link

Any guidance will be appreciated.

I will ensure that I bookmark your blog and will come back sometime soon.