Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
christophmluscher committed Jan 13, 2025
1 parent 09a22ce commit 2b32ab9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions i6_models/parts/samplers/log_uniform.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
class LogUniformSampler(nn.Module):
def __init__(self, num_classes: int, *, device: Optional[torch.device] = None):
"""
Samples from a log uniform distribution from classes.
Samples from a log uniform distribution from classes. Sampling is performed with replacement, i.e. sampled
indices can appear more than one in sampled set. This can be implemented with
`torch.distributions.multinomial.Multinomial` or `torch.multinomial`.
:param num_classes: number of classes from which the distribution is sampled.
:param num_classes: number of classes from which the distribution is sampled. The class indices are sorted in
descending order according to their frequency.
:param device: device on which the distribution is sampled.
"""
super().__init__()
Expand Down

0 comments on commit 2b32ab9

Please sign in to comment.