def f_tf(x):
    x = tf.reshape(x, shape=((- 1), input_dim))
    xb = ((x * tf.cast(4.0, dtype)) - tf.cast(2.0, dtype))
    val = (- (tf.log(((tf.cast(1.0, dtype) + (tf.math.pow(((xb[:, 0] + xb[:, 1]) + tf.cast(1.0, dtype)), 2) * (((((tf.cast(19.0, dtype) - (tf.cast(14.0, dtype) * xb[:, 0])) + ((tf.cast(3.0, dtype) * xb[:, 0]) * xb[:, 0])) - (tf.cast(14.0, dtype) * xb[:, 1])) + ((tf.cast(6.0, dtype) * xb[:, 0]) * xb[:, 1])) + ((tf.cast(3.0, dtype) * xb[:, 1]) * xb[:, 1])))) * (tf.cast(30.0, dtype) + (tf.math.pow(((tf.cast(2.0, dtype) * xb[:, 0]) - (tf.cast(3.0, dtype) * xb[:, 1])), 2) * (((((tf.cast(18.0, dtype) - (tf.cast(32.0, dtype) * xb[:, 0])) + ((tf.cast(12.0, dtype) * xb[:, 0]) * xb[:, 0])) + (tf.cast(48.0, dtype) * xb[:, 1])) - ((tf.cast(36.0, dtype) * xb[:, 0]) * xb[:, 1])) + ((tf.cast(27.0, dtype) * xb[:, 1]) * xb[:, 1])))))) - tf.cast(8.693, dtype)))
    return val
def f_tf(x):
    x = tf.reshape(x, shape=((- 1), input_dim))
    xb = ((x * tf.cast(4.0, dtype)) - tf.cast(2.0, dtype))
    val = (- (tf.log(((tf.cast(1.0, dtype) + (tf.math.pow(((xb[:, 0] + xb[:, 1]) + tf.cast(1.0, dtype)), 2) * (((((tf.cast(19.0, dtype) - (tf.cast(14.0, dtype) * xb[:, 0])) + ((tf.cast(3.0, dtype) * xb[:, 0]) * xb[:, 0])) - (tf.cast(14.0, dtype) * xb[:, 1])) + ((tf.cast(6.0, dtype) * xb[:, 0]) * xb[:, 1])) + ((tf.cast(3.0, dtype) * xb[:, 1]) * xb[:, 1])))) * (tf.cast(30.0, dtype) + (tf.math.pow(((tf.cast(2.0, dtype) * xb[:, 0]) - (tf.cast(3.0, dtype) * xb[:, 1])), 2) * (((((tf.cast(18.0, dtype) - (tf.cast(32.0, dtype) * xb[:, 0])) + ((tf.cast(12.0, dtype) * xb[:, 0]) * xb[:, 0])) + (tf.cast(48.0, dtype) * xb[:, 1])) - ((tf.cast(36.0, dtype) * xb[:, 0]) * xb[:, 1])) + ((tf.cast(27.0, dtype) * xb[:, 1]) * xb[:, 1])))))) - tf.cast(8.693, dtype)))
    return val