fix(task): fix corner case with small (<9) number of validation samples

This commit is contained in:
antoinelaurent authored and GitHub committed 2024-11-21 12:50:16 +01:00
1 parent 7d84f61061
commit 385eba615b
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -22,6 +22,7 @@
- fix(separation): fix clipping issue in speech separation pipeline ([@joonaskalda](https://github.com/joonaskalda/))
- fix(separation): fix alignment between separated sources and diarization ([@Lebourdais](https://github.com/Lebourdais/) and [@clement-pages](https://github.com/clement-pages/))
- fix(doc): fix link to pytorch ([@emmanuel-ferdman](https://github.com/emmanuel-ferdman/))
- fix(task): fix corner case with small (<9) number of validation samples ([@antoinelaurent](https://github.com/antoinelaurent/))
## Version 3.3.2 (2024-09-11)
@@ -583,7 +583,8 @@ class SpeakerDiarization(SegmentationTask):
y_pred = multilabel.cpu().numpy()
# prepare 3 x 3 grid (or smaller if batch size is smaller)
num_samples = min(self.batch_size, 9)
num_samples = min(self.batch_size, 9, y.shape[0])
nrows = math.ceil(math.sqrt(num_samples))
ncols = math.ceil(num_samples / nrows)
fig, axes = plt.subplots(