MIC-DKFZ / nnUNet

Apache License 2.0
5.66k stars 1.71k forks source link

arch_kwargs['deep_supervision'] is being updated instead of architecture_kwargs['deep_supervision'] #2425

Closed Xpiee closed 1 month ago

Xpiee commented 1 month ago

https://github.com/MIC-DKFZ/nnUNet/blob/96253e9dae2e7879520ab5dfc1c84aefe0f818e7/nnunetv2/utilities/get_network_from_plans.py#L32C9-L32C20

Should it be architecture_kwargs['deep_supervision'] instead of arch_kwargs['deep_supervision'], as arch_kwargs is not being used anywhere else?

`
if deep_supervision is not None and 'deep_supervision' not in arch_kwargs.keys(): arch_kwargs['deep_supervision'] = deep_supervision

network = nw_class(
    input_channels=input_channels,
    num_classes=output_channels,
    **architecture_kwargs
)

if hasattr(network, 'initialize') and allow_init:
    network.apply(network.initialize)

return network

`

FabianIsensee commented 1 month ago

Good catch, thanks!