Skip to content

Commit

Permalink
TileLayer, declare_same_as on out_dims
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Mar 3, 2022
1 parent 1d48b77 commit f2fb3ea
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions returnn/tf/layers/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4400,13 +4400,9 @@ def get_out_data_from_opts(cls, name, sources, multiples, out_dims=None, **kwarg
dim_tags = list(data.dim_tags)
for axis, multiple in multiples.items():
axis_int = data.get_axis_from_description(axis, allow_int=False)
tag = dim_tags[axis_int]
dim = None if tag.dimension is None else (tag.dimension * multiple)
tag = multiple * dim_tags[axis_int]
if out_dims and axis in out_dims:
tag = out_dims[axis]
assert tag.dimension == dim
else:
tag = multiple * tag
tag.declare_same_as(out_dims[axis])
dim_tags[axis_int] = tag
return data.copy_template_new_dim_tags(dim_tags, keep_special_axes=True)

Expand Down

0 comments on commit f2fb3ea

Please sign in to comment.