Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dim tag declare same as cleanup TODO #624

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
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