nnUNet
nnUNet copied to clipboard
UserWarning: positional arguments and argument "destination" are deprecated. nn.Module.state_dict will not accept them in the future
Getting following error while calling the segmentation model in our project. Can anyone please let me know how to get rid of this warning message please ?
/venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1383: UserWarning: positional arguments and argument "destination" are deprecated. nn.Module.state_dict will not accept them in the future. Refer to https://pytorch.org/docs/master/generated/torch.nn.Module.html#torch.nn.Module.state_dict for details.
Looks like
"load_pickle(pkl_file)"
or
"params = [torch.load(i, map_location=torch.device('cpu')) for i in [model]]"
is the source of this warning.
Thank you
Can you please tell me step by step what you did so that I can try to reproduce this?
Hi @DSRajesh,
did you manage to solve your problem?
Best, Yannick