Because I am searching but I cannot figure out how to make it work. Is there any way to load an image dataset stored in my PC ('png') so that it can be read by: trainX, trainY, testX, testY?? Because most of what I found is like this: (x_train, y_train), (x_test, y_test) = mnist.load_data() or (trainX, trainY), (testX, testY) = cifar10.load_data()
Kera how to load a dataset of images stored to my computer, not the Cifar-10?
Kera how to load a dataset of images stored to my computer, not the Cifar-10?
|
Do you mean like this?
def somefunc(): return ('trainX', 'trainY'), ('testX', 'testY') train, test = somefunc() print(train, test)
Or maybe def somefunc(): return 'trainX', 'trainY', 'testX', 'testY' trainX, trainY, testX, testY = somefunc() print(trainX, trainY, testX, testY )
Note it depends how mnist.load_data() returns its data, you could always make a function to return it how you wanted itsee this post for details of sequence unpacking
Jun-12-2020, 08:57 PM
No, I mean this:
When I run (x_train, y_train), (x_test, y_test) = mnist.load_data()it loads mnist dataset. I need instead of the mnist dataset to load the folder with the .png images that I have stored on my PC and contains 2 folders inside, the one folder has the training dataset and the other is the test dataset. Thank you
Jun-12-2020, 09:01 PM
Sorry, but from that one line and your description I don't understand
![]()
Jun-12-2020, 09:04 PM
For example: this tutorial here:
CNN code uses cifar10 dataset. I want to transform the code to load a dataset of images stored to my computer, not the Cifar-10. How do I achieve this? (Better now?) |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
[split] Kera Getting errors when following code example Image classification from scratch | hobbyist | 3 | 5,559 |
Apr-13-2021, 01:26 PM Last Post: amirian |
|
Mass load images | Linuxdesire | 1 | 2,828 |
Mar-29-2019, 06:24 PM Last Post: Larz60+ |
Users browsing this thread: 1 Guest(s)