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

'unet_final_features' referenced before assignment #80

Open
mukul-B opened this issue May 5, 2022 · 2 comments
Open

'unet_final_features' referenced before assignment #80

mukul-B opened this issue May 5, 2022 · 2 comments

Comments

@mukul-B
Copy link

mukul-B commented May 5, 2022

Traceback (most recent call last):
File "/usr/local/bin/nnUNet_train", line 33, in
sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_train')())
File "/content/UNetPlusPlus/pytorch/nnunet/run/run_training.py", line 136, in main
trainer.initialize(not validation_only)
File "/content/UNetPlusPlus/pytorch/nnunet/training/network_training/nnUNetPlusPlusTrainerV2.py", line 121, in initialize
self.initialize_network()
File "/content/UNetPlusPlus/pytorch/nnunet/training/network_training/nnUNetPlusPlusTrainerV2.py", line 158, in initialize_network
self.net_num_pool_op_kernel_sizes, self.net_conv_kernel_sizes, False, True, True)
File "/content/UNetPlusPlus/pytorch/nnunet/network_architecture/generic_UNetPlusPlus.py", line 344, in init
basic_block, transpconv)
File "/content/UNetPlusPlus/pytorch/nnunet/network_architecture/generic_UNetPlusPlus.py", line 475, in create_nest
return conv_blocks_localization, tu, unet_final_features
UnboundLocalError: local variable 'unet_final_features' referenced before assignment

@beargolden
Copy link

Traceback (most recent call last): File "/usr/local/bin/nnUNet_train", line 33, in sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_train')()) File "/content/UNetPlusPlus/pytorch/nnunet/run/run_training.py", line 136, in main trainer.initialize(not validation_only) File "/content/UNetPlusPlus/pytorch/nnunet/training/network_training/nnUNetPlusPlusTrainerV2.py", line 121, in initialize self.initialize_network() File "/content/UNetPlusPlus/pytorch/nnunet/training/network_training/nnUNetPlusPlusTrainerV2.py", line 158, in initialize_network self.net_num_pool_op_kernel_sizes, self.net_conv_kernel_sizes, False, True, True) File "/content/UNetPlusPlus/pytorch/nnunet/network_architecture/generic_UNetPlusPlus.py", line 344, in init basic_block, transpconv) File "/content/UNetPlusPlus/pytorch/nnunet/network_architecture/generic_UNetPlusPlus.py", line 475, in create_nest return conv_blocks_localization, tu, unet_final_features UnboundLocalError: local variable 'unet_final_features' referenced before assignment

Same problem. Have you solved this problem?

@jarusRnD
Copy link

I am also facing the same issue with unet_final_features being referenced before assignment. It seems like the variable is not being initialized correctly in the create_nest function in generic_UNetPlusPlus.py.

Has anyone resolved this issue or identified the root cause? If so, could you please share the fix or suggest a workaround?
I’d appreciate it if you could share the details.

Thanks in advance!

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

No branches or pull requests

3 participants