Update finetune.py (#1304)

This commit is contained in:
zr_jin 2023-10-12 16:48:23 +08:00 committed by GitHub
parent 2b3c5d799f
commit 855492156a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -734,7 +734,7 @@ def train_one_epoch(
scaler.update()
optimizer.zero_grad()
except: # noqa
display_and_save_batch(batch, params=params)
display_and_save_batch(batch, params=params, graph_compiler=graph_compiler)
raise
if params.print_diagnostics and batch_idx == 5: