Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions returnn/tf/util/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def declare_same_as(self, other):
return
self_same_as.same_as = other_same_base
self_same_as._same_as_tb = traceback.extract_stack()
# TODO this is unsafe, slightly incorrect...
if self_same_as.dyn_size_ext is None:
self_same_as.dyn_size_ext = other_same_base.dyn_size_ext
elif other_same_base.dyn_size_ext is None:
Expand All @@ -463,6 +464,7 @@ def declare_same_as(self, other):
# maybe we can overtake the size_placeholder now.
if self.same_as.dyn_size is not None and self.src_data:
assert isinstance(self.src_axis, int)
# TODO Is this still needed? also looks wrong
# Maybe it changed in the meanwhile, so check.
if self.src_data.get_dim_tag(self.src_axis).description == self.description:
self.src_data.size_placeholder[
Expand Down