File size: 394 Bytes
5fa1a76
 
 
 
 
 
 
1
2
3
4
5
6
7
If you're using your own training loop or another Trainer you can accomplish the same with:
thon
from transformers.debug_utils import DebugUnderflowOverflow
debug_overflow = DebugUnderflowOverflow(model)

[~debug_utils.DebugUnderflowOverflow] inserts hooks into the model that immediately after each
forward call will test input and output variables and also the corresponding module's weights.