import torch


def weighted_mse_loss(tno, tne, tnw):
  """ Weighted mean square error loss.
  Args:
    tno Output tensor
    tne Expected output tensor
    tnw Weight tensor
  Returns:
    Associated loss tensor
  """
  return torch.mean((tno - tne).pow_(2).mul_(tnw))