mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Merge branch 'scaled_adam_exp564' into scaled_adam_exp573
This commit is contained in:
commit
8976e1e43b
@ -543,6 +543,10 @@ def attach_diagnostics(
|
|||||||
_model_diagnostic[f"{_name}.grad[{i}]"].accumulate(o,
|
_model_diagnostic[f"{_name}.grad[{i}]"].accumulate(o,
|
||||||
class_name=type(_module).__name__)
|
class_name=type(_module).__name__)
|
||||||
|
|
||||||
|
|
||||||
|
module.register_forward_hook(forward_hook)
|
||||||
|
module.register_backward_hook(backward_hook)
|
||||||
|
|
||||||
if type(module).__name__ in ["Sigmoid", "Tanh", "ReLU", "TanSwish", "Swish", "DoubleSwish"]:
|
if type(module).__name__ in ["Sigmoid", "Tanh", "ReLU", "TanSwish", "Swish", "DoubleSwish"]:
|
||||||
# For these specific module types, accumulate some additional diagnostics
|
# For these specific module types, accumulate some additional diagnostics
|
||||||
# that can help us improve the activation function. These require a lot of memory,
|
# that can help us improve the activation function. These require a lot of memory,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user