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: