Skip to content

Commit 6e96325

Browse files
committed
Rec layer template construction, better reraise
1 parent 3339d7a commit 6e96325

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

returnn/tf/layers/rec.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,8 @@ def __call__(lself, name, is_prev_time_frame=False):
13731373
try:
13741374
assert not self.layer_data_templates, "do not call this multiple times"
13751375
get_templated_layer.construct("output")
1376-
assert "output" in self.layer_data_templates
1376+
if "output" not in self.layer_data_templates:
1377+
raise ConstructCtx.recent_exception
13771378
assert not ConstructCtx.layers
13781379

13791380
if "end" in self.net_dict: # used to specify ending of a sequence

0 commit comments

Comments
 (0)