user27357269
user27357269

Reputation: 1

options for loading mnist dataset in python

I am confused about the options for loading data into python. Using the mnist dataset, I have found numerous options for loading the test and trainsets. Since these options are tethered to the tutorial associated with each way to load the data, I am interested in how to make these different load interchangable. As an example, the code in https://github.com/tschechlovdev/AutoEncoder_KMeans/blob/main/AutoEncoder_KMeans_MNIST.ipynb uses trainset = MNIST('./', download=True, train=True,transform=transform) testset = MNIST('./', download=True,train=False,transform=transform) However the raw mnist data can also be loaded and processed using https://rpubs.com/JanpuHou/465274

My question is whether there is Python code that will make these datasets interchangeable?

After reading various blogs I have taken the above test/train datasets, converted them to panda dataframes, exported as CSV and loaded using pd.read_csv. Unfortunately this process does not get me back to the original trainset and testset formats obtained using MNIST as above.

Could anyone explain whether this is possible, and if so, how? My overall objective is to mimic the MNIST data with my own. I would add that I am totally confused about attributes, class, property assignments in python, despite the numerous blogs on the topic.

The strategy on converting to a Panda dataframe failed. In other words, the data could be successfully written to a CSV file, then read (od.read_csv).

But their format has changed.

Upvotes: 0

Views: 101

Answers (0)

Related Questions