(ctx, x)
| 39 | layer = core.Dense(1, use_bias=use_bias) |
| 40 | |
| 41 | def loss_fn(ctx, x): |
| 42 | del ctx |
| 43 | y = array_ops.reshape(layer(x), []) - constant_op.constant(1.) |
| 44 | return y * y |
| 45 | |
| 46 | single_loss_step = step_fn.StandardSingleLossStep( |
| 47 | dataset_fn, loss_fn, optimizer, distribution, iterations_per_step) |