From e5a5d90393880aa32d59d376faa3264ba8c7ae78 Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Thu, 9 Nov 2023 12:25:38 +0000 Subject: [PATCH] RF containers, better exc msg --- returnn/frontend/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/returnn/frontend/container.py b/returnn/frontend/container.py index 1f4a939acf..d4470efd6f 100644 --- a/returnn/frontend/container.py +++ b/returnn/frontend/container.py @@ -147,7 +147,7 @@ def _convert_to_module(obj: _ModT) -> rf.Module: elif callable(obj): return rf.Functional(obj) else: - raise TypeError(f"did not expect {obj!r}") + raise TypeError(f"Expected rf.Module or callable, did not expect {obj!r} ({type(obj)})") def _is_iterable(obj) -> bool: