mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-08 17:42:21 +00:00
Save batch to disk on exception. (#350)
This commit is contained in:
parent
00c48ec1f3
commit
32f05c00e3
@ -1001,7 +1001,7 @@ def scan_pessimistic_batches_for_oom(
|
||||
loss.backward()
|
||||
optimizer.step()
|
||||
optimizer.zero_grad()
|
||||
except RuntimeError as e:
|
||||
except Exception as e:
|
||||
if "CUDA out of memory" in str(e):
|
||||
logging.error(
|
||||
"Your GPU ran out of memory with the current "
|
||||
|
Loading…
x
Reference in New Issue
Block a user