def l2_regression_sq_loss(y, target, name=None):
  """Calculates the sum of squared errors between y and target.

  Args:
    y: the calculated values.
    target: the desired values.
    name: the name for this op, defaults to l2_regression
  Returns:
    A tensorflow op.
  """
  with tf.name_scope(name, 'l2_regression_sq', [y, target]) as scope:
    y = tf.convert_to_tensor(y, name='y')
    target = tf.convert_to_tensor(target, name='target')
    return reduce_batch_sum(tf.square(y - target), name=scope)
def l2_regression_sq_loss ( y , target , name = None ) : with tf . name_scope ( name , 'l2_regression_sq' , [ y , target ] ) as scope : y = tf . convert_to_tensor ( y , name = 'y' ) target = tf . convert_to_tensor ( target , name = 'target' ) return reduce_batch_sum ( tf . square ( y - target ) , name = scope )
Calculates the sum of squared errors between y and target.

  Args:
    y: the calculated values.
    target: the desired values.
    name: the name for this op, defaults to l2_regression
  Returns:
    A tensorflow op.