diff --git a/vall_e/engines/base.py b/vall_e/engines/base.py index a077eaf..7fb04fd 100755 --- a/vall_e/engines/base.py +++ b/vall_e/engines/base.py @@ -568,7 +568,7 @@ class Engines(dict[str, Engine]): name.split("-")[0]: dict( **engine_stats, lr=engine.get_lr()[0], - grad_norm=grad_norm, + grad_norm=grad_norm.item() if isinstance( grad_norm, torch.Tensor ) else grad_norm, loss_scale=loss_scale if loss_scale != 1 else None, elapsed_time=elapsed_time, engine_step=engine.global_step,