Skip to content

Commit

Permalink
remove import from tf util, we are using torch
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoLegends committed Jul 23, 2024
1 parent 7ff75e3 commit 894ea8b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions returnn/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,9 @@ def collect_tensor_names(returnn_root: str, data_dict: Dict[str, Any]) -> List[s
try:
from returnn.tensor import Tensor
except ImportError:
try:
# old RETURNN, relevant?
from returnn.tf.util.data import Data as Tensor
except ImportError:
# For backwards compatibility assume dynamic time axis (i.e. axis 1 in
# BTF order) if we cannot import the Tensor class.
return [name for k in data_dict.keys() for name in [k, f"{k}:size1"]]
# For backwards compatibility assume dynamic time axis (i.e. axis 1 in
# BTF order) if we cannot import the Tensor class.
return [name for k in data_dict.keys() for name in [k, f"{k}:size1"]]

names = []
for name, opts in data_dict.items():
Expand Down

0 comments on commit 894ea8b

Please sign in to comment.