Quadratic Data Set¶
-
class
deepobs.tensorflow.datasets.quadratic.
quadratic
(batch_size, dim=100, train_size=1000, noise_level=0.6)[source]¶ DeepOBS data set class to create an n dimensional stochastic quadratic testproblem.
This toy data set consists of a fixed number (train_size
) of iid draws from a zero-mean normal distribution indim
dimensions with isotropic covariance specified bynoise_level
.Parameters: - batch_size (int) -- The mini-batch size to use. Note that, if
batch_size
is not a divider of the dataset size (1000
for train and test) the remainder is dropped in each epoch (after shuffling). - dim (int) -- Dimensionality of the quadratic. Defaults to
100
. - train_size (int) -- Size of the dataset; will be used for train, train eval and
test datasets. Defaults to
1000
. - noise_level (float) -- Standard deviation of the data points around the mean.
The data points are drawn from a Gaussian distribution.
Defaults to
0.6
.
-
batch
¶ A tensor
X
of shape(batch_size, dim)
yielding elements from the dataset. 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