Skip to content

Commit 0727228

Browse files
committed
Tensor verify_out_shape, ignore missing implicit dims
rwth-i6/returnn#1153 Fix #226
1 parent a870004 commit 0727228

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nn/base.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,13 @@ def verify_out_shape(self, out_shape: OutShapeType):
231231
This does not add out_shape to the layer dict as we already have that automatically.
232232
Thus, this is purely for verification here on returnn-common side.
233233
234+
Also, we are more relaxed here. We currently ignore missing implicit dims.
235+
https://github.com/rwth-i6/returnn/issues/1153
236+
234237
:return: self, such that you can write this as a chained op
235238
:rtype: Tensor
236239
"""
237-
self.data.verify_out_shape(out_shape)
240+
self.data.verify_out_shape(out_shape, allow_missing_implicit_dims=True)
238241
return self
239242

240243
def _assign_parent_name_ctx(self, *, ref_ctx: nn.NameCtx):

0 commit comments

Comments
 (0)