parameters: (self, loss, weight_tensor)
return_statement: return weighted_loss
docstring: Returns cumulative weighted loss.
docstring_summary: Returns cumulative weighted loss.
docstring_tokens: Returns cumulative weighted loss .
function: def _weighted_loss(self, loss, weight_tensor):
      """Returns cumulative weighted loss."""
      unweighted_loss = array_ops.reshape(loss, shape=(-1,))
      weighted_loss = math_ops.mul(unweighted_loss,
                                   array_ops.reshape(
                                       weight_tensor, shape=(-1,)))
      return weighted_loss
function_tokens: def _weighted_loss ( self , loss , weight_tensor ) : unweighted_loss = array_ops . reshape ( loss , shape = ( - 1 , ) ) weighted_loss = math_ops . mul ( unweighted_loss , array_ops . reshape ( weight_tensor , shape = ( - 1 , ) ) ) return weighted_loss