mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 10:02:22 +00:00
Small fixes
This commit is contained in:
parent
c736b39c7d
commit
5230e73e41
@ -272,7 +272,7 @@ class ModelDiagnostic(object):
|
|||||||
|
|
||||||
|
|
||||||
def attach_diagnostics(
|
def attach_diagnostics(
|
||||||
model: nn.Module, opts: TensorDiagnosticOptions
|
model: nn.Module, opts: Optional[TensorDiagnosticOptions] = None
|
||||||
) -> ModelDiagnostic:
|
) -> ModelDiagnostic:
|
||||||
"""Attach a ModelDiagnostic object to the model by
|
"""Attach a ModelDiagnostic object to the model by
|
||||||
1) registering forward hook and backward hook on each module, to accumulate
|
1) registering forward hook and backward hook on each module, to accumulate
|
||||||
@ -335,7 +335,7 @@ def attach_diagnostics(
|
|||||||
|
|
||||||
|
|
||||||
def _test_tensor_diagnostic():
|
def _test_tensor_diagnostic():
|
||||||
opts = TensorDiagnosticOptions(2 ** 20, 512)
|
opts = TensorDiagnosticOptions(512)
|
||||||
|
|
||||||
diagnostic = TensorDiagnostic(opts, "foo")
|
diagnostic = TensorDiagnostic(opts, "foo")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user