We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7040faf commit 81829a3Copy full SHA for 81829a3
src/otx/algo/samplers/balanced_sampler.py
@@ -65,7 +65,7 @@ def __init__(
65
self.img_indices = {k: torch.tensor(v, dtype=torch.int64) for k, v in ann_stats.items() if len(v) > 0}
66
self.num_cls = len(self.img_indices.keys())
67
self.data_length = len(self.dataset)
68
- self.num_trials = int(self.data_length / self.num_cls)
+ self.num_trials = max(int(self.data_length / self.num_cls), 1)
69
70
if efficient_mode:
71
# Reduce the # of sampling (sampling data for a single epoch)
0 commit comments