def reduce_mean_over_l_sum_over_c(x, x_mask):
  """Returns mean of x over L and sum over C."""
  mean = reduce_sum_over_lc(x, x_mask)
  return mean / tf.reduce_sum(x_mask, 1)
Returns mean of x over L and sum over C.
tensor2tensor/layers/transformer_glow_layers_ops.py