MNIST Data Set¶
-
class
deepobs.tensorflow.datasets.mnist.mnist(batch_size, train_eval_size=10000)[source]¶ DeepOBS data set class for the MNIST data set.
Parameters: - batch_size (int) -- The mini-batch size to use. Note that, if
batch_sizeis not a divider of the dataset size (60 000for train,10 000for test) the remainder is dropped in each epoch (after shuffling). - train_eval_size (int) -- Size of the train eval data set.
Defaults to
10 000the size of the test set.
-
batch¶ A tuple
(x, y)of tensors, yielding batches of MNIST images (xwith shape(batch_size, 28, 28, 1)) and corresponding one-hot label vectors (ywith shape(batch_size, 10)). Executing these tensors raises atf.errors.OutOfRangeErrorafter one epoch.
-
train_init_op¶ A tensorflow operation initializing the dataset for the training phase.
-
train_eval_init_op¶ A tensorflow operation initializing the testproblem for evaluating on training data.
-
valid_init_op¶ A tensorflow operation initializing the testproblem for evaluating on validation data.
-
test_init_op¶ A tensorflow operation initializing the testproblem for evaluating on test data.
-
phase¶ A string-value tf.Variable that is set to
train,train_eval,valid, ortest, depending on the current phase. This can be used by testproblems to adapt their behavior to this phase.
- batch_size (int) -- The mini-batch size to use. Note that, if