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

Stack too deep when subnetworks are involved #993

Closed
albertz opened this issue Mar 15, 2022 · 0 comments · Fixed by #1001
Closed

Stack too deep when subnetworks are involved #993

albertz opened this issue Mar 15, 2022 · 0 comments · Fixed by #1001

Comments

@albertz
Copy link
Member

albertz commented Mar 15, 2022

With subnetworks, the stack can become quite deep and convoluted (independent of not using flat net construction, #992), like:

_create_layer, network.py:1048
add_layer, network.py:1118
add_layer, network.py:1116
add_layer, network.py:1116
add_layer, network.py:1116
construct_layer, network.py:959
get_layer, network.py:839
wrapped_get_layer, network.py:3011
wrapped_get_layer, network.py:3030
wrapped_get_layer, network.py:3011
wrapped_get_layer, network.py:3030
wrapped_get_layer, network.py:3011
wrapped_get_layer, network.py:3030
<listcomp>, base.py:589
transform_config_dict, base.py:588
construct_layer, network.py:952
get_layer, network.py:839
wrapped_get_layer, network.py:3011
wrapped_get_layer, network.py:3030
wrapped_get_layer, network.py:3011
wrapped_get_layer, network.py:3030
wrapped_get_layer, network.py:3011
wrapped_get_layer, network.py:3030
...
_construct_template, rec.py:1569
__init__, rec.py:1180
transform_config_dict, rec.py:406
construct_layer, network.py:952
get_layer, network.py:839
construct_layer, network.py:919
get_layer, network.py:839
<listcomp>, base.py:589
transform_config_dict, base.py:588
transform_config_dict, basic.py:363
construct_layer, network.py:952
construct_from_dict, network.py:633
create_network, engine.py:1342
_init_network, engine.py:1301
init_network_from_config, engine.py:1121
init_train_from_config, engine.py:1056

See here for a better stack trace: https://gist.github.com/albertz/a1a20710e4d08292e35ba6910ca132e8 (via #1001)

Esp the logic using wrapped_get_layer contributes to this.

This should be cleaned up.

albertz added a commit that referenced this issue Mar 16, 2022
albertz added a commit that referenced this issue Mar 16, 2022
albertz added a commit that referenced this issue Mar 16, 2022
albertz added a commit that referenced this issue Mar 17, 2022
albertz added a commit that referenced this issue Mar 17, 2022
albertz added a commit that referenced this issue Mar 17, 2022
albertz added a commit that referenced this issue Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant