ImageNet Data Set¶
-
class
deepobs.tensorflow.datasets.imagenet.
imagenet
(batch_size, data_augmentation=True, train_eval_size=50000)[source]¶ DeepOBS data set class for the ImageNet data set.
Note
We use
1001
classes which includes an additional background class, as it is used for example by the inception net.Parameters: - batch_size (int) -- The mini-batch size to use. Note that, if
batch_size
is not a divider of the dataset size the remainder is dropped in each epoch (after shuffling). - data_augmentation (bool) -- If
True
some data augmentation operations (random crop window, horizontal flipping, lighting augmentation) are applied to the training data (but not the test data). - train_eval_size (int) -- Size of the train eval dataset.
Defaults to
10 000
.
-
batch
¶ A tuple
(x, y)
of tensors, yielding batches of ImageNet images (x
with shape(batch_size, 224, 224, 3)
) and corresponding one-hot label vectors (y
with shape(batch_size, 1001)
). Executing these tensors raises atf.errors.OutOfRangeError
after 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.
-
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
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