Skip to content

Commit

Permalink
add comments related to balance usage in mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
FrenchKrab committed Jul 17, 2023
1 parent 9724c1a commit da744fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyannote/audio/tasks/segmentation/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ def train__iter__(self):
for product in itertools.product(
*[self.metadata_unique_values[key] for key in balance]
):
# we iterate on the cartesian product of the values in metadata_unique_values
# eg: for balance=["database", "split"], with 2 databases and 2 splits:
# ("DIHARD", "A"), ("DIHARD", "B"), ("REPERE", "A"), ("REPERE", "B")
filters = {key: value for key, value in zip(balance, product)}
subchunks[product] = self.train__iter__helper(rng, **filters)

Expand Down

0 comments on commit da744fe

Please sign in to comment.