A
A
Alexander Fedorov2018-04-29 21:46:10
Neural networks
Alexander Fedorov, 2018-04-29 21:46:10

How to select only a certain digit in MNIST (for example, only zeros)?

Can you please tell me how (if at all possible) to select only a specific number from the MNIST database for training?
Only zeros need to be selected for DCGAN training.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danil, 2018-04-29
@Pagliaccio

from sklearn import datasets

# load only one class from 10 possible
mnist = datasets.load_digits(n_class=1)
X_train = mnist.images
y_train = mnist.target

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question