multinomial

dragon.vm.torch.multinomial(
  input,
  num_samples,
  eps=0.0,
  out=None
)[source]

Return a tensor where each row sampled from the multinomial distribution.

Parameters:
  • input (dragon.vm.torch.Tensor) – The input tensor.
  • num_samples (int) – The number of samples in each row.
  • eps (float, optional, default=0.) – The prob to a uniform sampling.
  • out (dragon.vm.torch.Tensor, optional) – The output tensor.
Returns:

dragon.vm.torch.Tensor – The output tensor.