tf.SquaredErrorLayer module

tf.SquaredErrorLayer module

class tf.SquaredErrorLayer.SquaredErrorLayer(*args: Any, **kwargs: Any)

Bases: modelzoo.common.layers.tf.BaseLayer.BaseLayer

Squared error between prediction and labels.

Parameters
  • boundary_casting (bool) – If True, outputs the values in half precision and casts the input values up to full precision.

  • tf_summary (bool) – If True, saves the activations with summary_layer.

call(labels, pred)

Calculates the squared error between prediction and labels.

Parameters
  • labels (Tensor) – Labels.

  • pred (Tensor) – Predictions (same shape as labels).

Returns

Loss tensor of the same shape and type as pred.

Return type

Tensor