MCPcopy Index your code
hub / github.com/MoonInTheRiver/DiffSinger / size

Method size

tasks/base_task.py:54–58  ·  view source on GitHub ↗

Return an example's size as a float or tuple. This value is used when filtering a dataset with ``--max-positions``.

(self, index)

Source from the content-addressed store, hash-verified

52 return self.size(index)
53
54 def size(self, index):
55 """Return an example's size as a float or tuple. This value is used when
56 filtering a dataset with ``--max-positions``."""
57 size = min(self._sizes[index], hparams['max_frames'])
58 return size
59
60 def ordered_indices(self):
61 """Return an ordered list of indices. Batches will be constructed based

Callers 15

num_tokensMethod · 0.95
_training_stepMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
ssimFunction · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
collate_1dFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected