Quadratic Test Problems¶
DeepOBS includes a stochastic quadratic problem with an eigenspectrum similar to what has been reported for neural networks.
Other stochastic quadratic problems (of different dimensionality or with a
different Hessian structure) can be created easily using the
_quadratic_base(batch_size, weight_decay=None, hessian=array([[1., 0., 0., ..., 0., 0., 0.], [0., 1., 0., ..., 0., 0., 0.], [0., 0., 1., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 1., 0., 0.], [0., 0., 0., ..., 0., 1., 0.], [0., 0., 0., ..., 0., 0., 1.]]))¶
DeepOBS base class for a stochastic quadratic test problems creating lossfunctions of the form
\(0.5* (\theta - x)^T * Q * (\theta - x)\)
xcoming from the quadratic data set, i.e., zero-mean normal.
- batch_size (int) -- Batch size to use.
- weight_decay (float) -- No weight decay (L2-regularization) is used in this
test problem. Defaults to
Noneand any input here is ignored.
- hessian (np.array) -- Hessian of the quadratic problem.
Defaults to the
The DeepOBS data set class for the quadratic test problem.
A tensorflow operation initializing the test problem for the training phase.
A tensorflow operation initializing the test problem for evaluating on training data.
A tensorflow operation initializing the test problem for evaluating on test data.
A tf.Tensor of shape (batch_size, ) containing the per-example loss values.
A scalar tf.Tensor containing a regularization term. Will always be
0.0since no regularizer is used.
Sets up the stochastic quadratic test problem. The parameter
Thetawill be initialized to (a vector of)