Skip to content

Commit acf85fe

Browse files
committed
Dim is_equal small fix
1 parent 3fa6739 commit acf85fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

returnn/tf/util/data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,15 +697,15 @@ def is_equal(self, other, ignore_feature_dim=False, allow_same_feature_dim=False
697697
if self.dimension != other.dimension:
698698
return False
699699
return self.kind == other.kind
700-
if self.derived_from_op and other.derived_from_op:
701-
if self.derived_from_op == other.derived_from_op:
702-
return True
703700
if allow_same_spatial_dim is None:
704701
allow_same_spatial_dim = allow_same_feature_dim
705702
self_base = self.get_same_derived_base() if derived_matches else self.get_same_base()
706703
other_base = other.get_same_derived_base() if derived_matches else other.get_same_base()
707704
if self_base is other_base:
708705
return True
706+
if self_base.derived_from_op and other_base.derived_from_op:
707+
if self_base.derived_from_op == other_base.derived_from_op:
708+
return True
709709
self_kind = self.kind
710710
other_kind = other.kind
711711
if self_kind == other_kind == self.Types.Feature and ignore_feature_dim:

0 commit comments

Comments
 (0)