2D Beale

class deepobs.tensorflow.testproblems.two_d_beale.two_d_beale(batch_size, weight_decay=None)[source]

DeepOBS test problem class for a stochastic version of thetwo-dimensional Beale function as the loss function.

Using the deterministic Beale function and adding stochastic noise of the form

\(u \cdot x + v \cdot y\)

where x and y are normally distributed with mean 0.0 and standard deviation 1.0 we get a loss function of the form

\(((1.5 - u + u \cdot v)^2 + (2.25 - u + u \cdot v ^ 2) ^ 2 + (2.625 -\ u + u \cdot v ^ 3) ^ 2) + u \cdot x + v \cdot y\).

Parameters:
  • batch_size (int) -- Batch size to use.
  • weight_decay (float) -- No weight decay (L2-regularization) is used in this test problem. Defaults to None and any input here is ignored.
dataset

The DeepOBS data set class for the two_d stochastic test problem.

train_init_op

A tensorflow operation initializing the test problem for the training phase.

train_eval_init_op

A tensorflow operation initializing the test problem for evaluating on training data.

test_init_op

A tensorflow operation initializing the test problem for evaluating on test data.

losses

A tf.Tensor of shape (batch_size, ) containing the per-example loss values.

regularizer

A scalar tf.Tensor containing a regularization term. Will always be 0.0 since no regularizer is used.

set_up()[source]

Sets up the stochastic two-dimensional Beale test problem. Using -4.5 and 4.5 as a starting point for the weights u and v.