multinomial

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

Return a tensor with index sampled from multinomial distribution.

Parameters:
  • input (dragon.vm.torch.Tensor) – The input tensor.
  • num_samples (int) – The number of samples in each row.
  • epsilon (float, optional, default=0) – The epsilon value to apply epsilon-greedy strategy.
  • out (dragon.vm.torch.Tensor, optional) – The output tensor.
Returns:

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