Skip to content

Commit

Permalink
Update pyannote/audio/tasks/segmentation/speaker_diarization.py
Browse files Browse the repository at this point in the history
Co-authored-by: Hervé BREDIN <[email protected]>
  • Loading branch information
clement-pages and hbredin authored Nov 25, 2024
1 parent 32fb725 commit eef7a77
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pyannote/audio/tasks/segmentation/speaker_diarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,7 @@ def training_step(self, batch, batch_idx: int):

if not self.automatic_optimization:
optimizers = self.model.optimizers()
optimizers = (
[optimizers] if not isinstance(optimizers, list) else optimizers
)
optimizers = optimizers if isinstance(optimizers, list) else [optimizers]
for optimizer in optimizers:
optimizer.zero_grad()

Expand Down

0 comments on commit eef7a77

Please sign in to comment.