multinomial

dragon.random.multinomial(
  inputs,
  num_samples=1,
  epsilon=0,
  normalize=False,
  **kwargs
)[source]

Return a tensor with index sampled from multinomial distribution.

If normalize is True, negative input is accepted.

Otherwise, input should be non-negative.

Parameters:
  • inputs (dragon.Tensor) – The input tensor.
  • num_samples (int, optional, default=1) – The number of samples.
  • epsilon (float, optional, default=0) – The epsilon value to apply e-greedy strategy.
  • normalize (bool, optional, default=False) – Whether to normalize the input.
Returns:

dragon.Tensor – The output tensor.