torch.median
torch.median(input) -> Tensor
Returns the median of the values in "input".
Note:
 The median is not unique for "input" tensors with an even number
 of elements. In this case the lower of the two medians is
 returned. To compute the mean of both medians, use
 "torch.quantile()" with "q=0.5" instead.

Warning:
 This function produces deterministic (sub)gradients unlike
 "median(dim=0)"

Parameters:
      input (Tensor) -- the input tensor.
Example:
  >>> a = torch.randn(1, 3)
  >>> a
  tensor([[ 1.5219, -1.5212,  0.2202]])
  >>> torch.median(a)
  tensor(0.2202)

torch.median(input, dim=- 1, keepdim=False, *, out=None)
Returns a namedtuple "(values, indices)" where "values" contains
   the median of each row of "input" in the dimension "dim", and
   "indices" contains the index of the median values found in the
   dimension "dim".
By default, "dim" is the last dimension of the "input" tensor.