mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 10:02:22 +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()
|
loss.backward()
|
||||||
optimizer.step()
|
optimizer.step()
|
||||||
optimizer.zero_grad()
|
optimizer.zero_grad()
|
||||||
except RuntimeError as e:
|
except Exception as e:
|
||||||
if "CUDA out of memory" in str(e):
|
if "CUDA out of memory" in str(e):
|
||||||
logging.error(
|
logging.error(
|
||||||
"Your GPU ran out of memory with the current "
|
"Your GPU ran out of memory with the current "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user