Load database from file

I have convert the SVHN dataset to MNIST so the file that I have now is one with extension “file” and one with extension “GZ” (gzip). So I try to load this data set but I cant figure out how I could do that.
The only way I know to load data is with dataloader and with data that I have directly download from pytorch. You know, like dataset.MNIST(… … …, download=True) but in my case that cant help because i have already the dataset i need

Take a look at the datasets.MNIST implementation to see how the binary data is loaded into this Dataset as it seems you could use it as a template assuming your data is “MNIST-like”.

thank you for responding. I created a custom dataloader class and i loaded my dataset. now i have a runtime error when i try to test these data the error is this:
Traceback (most recent call last):
File “C:\Users\giann\AppData\Local\Programs\Python\Python310\python projects\occ ood ergasia pack(meta apo call)\pytorch-tutorial.py”, line 125, in
images = images.reshape(-1, 28*28).to(device)
RuntimeError: shape ‘[-1, 784]’ is invalid for input of size 100

It seems your data samples have 100 elements and thus cannot be reshaped to [28, 28] (MNIST image size) as this shape requires 784 elements.