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

Also infer dynamic axes for every model input and output #529

Merged
merged 8 commits into from
Jul 23, 2024
Merged
Changes from 1 commit
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
15 changes: 5 additions & 10 deletions returnn/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,11 @@ def __init__(
self.checkpoint = checkpoint

# Get the list here, because ReturnnConfig serialization might potentially reorder via `sort_config=True`.
input_names = (
list(returnn_config.config["extern_data"].keys())
if ("extern_data" in returnn_config.config and input_names is None)
else input_names
)
output_names = (
list(returnn_config.config["model_outputs"].keys())
if ("model_outputs" in returnn_config.config and output_names is None)
else output_names
)

if "extern_data" in returnn_config.config and input_names is None:
input_names = [name for k in returnn_config.config["extern_data"].keys() for name in [k, f"{k}:size1"]]
if "model_outputs" in returnn_config.config and output_names is None:
output_names = [name for k in returnn_config.config["model_outputs"].keys() for name in [k, f"{k}:size1"]]
self.input_names = input_names
self.output_names = output_names

Expand Down
Loading