MCPcopy Create free account
hub / github.com/FunAudioLLM/ThinkSound / multinomial

Function multinomial

ThinkSound/models/utils.py:29–51  ·  view source on GitHub ↗

torch.multinomial with arbitrary number of dimensions, and number of candidates on the last dimension. Args: input (torch.Tensor): The input tensor containing probabilities. num_samples (int): Number of samples to draw. replacement (bool): Whether to draw with replacemen

(input: torch.Tensor, num_samples: int, replacement=False, *, generator=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

sample_top_kFunction · 0.85
sample_top_pFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected