From 5230e73e41d1fb57c10a78c609ccc548bf8b4cf0 Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Thu, 19 May 2022 12:49:00 +0800 Subject: [PATCH] Small fixes --- icefall/diagnostics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icefall/diagnostics.py b/icefall/diagnostics.py index 1cd685d37..e8bedc64e 100644 --- a/icefall/diagnostics.py +++ b/icefall/diagnostics.py @@ -272,7 +272,7 @@ class ModelDiagnostic(object): def attach_diagnostics( - model: nn.Module, opts: TensorDiagnosticOptions + model: nn.Module, opts: Optional[TensorDiagnosticOptions] = None ) -> ModelDiagnostic: """Attach a ModelDiagnostic object to the model by 1) registering forward hook and backward hook on each module, to accumulate @@ -335,7 +335,7 @@ def attach_diagnostics( def _test_tensor_diagnostic(): - opts = TensorDiagnosticOptions(2 ** 20, 512) + opts = TensorDiagnosticOptions(512) diagnostic = TensorDiagnostic(opts, "foo")