Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie committed Nov 12, 2024
1 parent 2326ab5 commit 2e77a48
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions speech_training_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,9 @@ def prepare_dataset(batch):
"lr": torch.tensor(optimizer.param_groups[0]["lr"]),
"temp": torch.tensor(gumbel_temperature),
"grad_norm": torch.tensor(grad_norm),
"Outputs": outputs
"Outputs": outputs,
"projectec_states": torch.tensor(outputs.projected_states),
"projected_quant_states": torch.tensor(outputs.projected_quantized_states)
}

log_str = ""
Expand Down Expand Up @@ -851,7 +853,7 @@ def prepare_dataset(batch):
val_logs["val_contrastive_loss"] += outputs.contrastive_loss
val_logs["val_diversity_loss"] += outputs.diversity_loss
val_logs["val_num_losses"] += batch["mask_time_indices"].sum()
val_logs["val_outputs"] += outputs
# val_logs["val_outputs"] += outputs

# sum over devices in multi-processing
if accelerator.num_processes > 1:
Expand Down

0 comments on commit 2e77a48

Please sign in to comment.