Closed wyli closed 1 year ago
pythonic API to set initial weights of a model from a model zoo item
for example, loading from existing bundle:
my_model = monai.networks.net.SwinUNETR(...) load_state_dict(my_model, weights_url='model-zoo:swin_unetr_btcv_segmentation')
the load_state_dict should implement the logic of filtering and assigning parameters, similar to this existing implementation in DenseNet:
load_state_dict
https://github.com/Project-MONAI/MONAI/blob/e15da1ca3f0651faf3bc75c8274f417acc2c27b1/monai/networks/nets/densenet.py#L266-L281
basic utils implemented by https://github.com/Project-MONAI/MONAI/commit/392c5c1b860c0f0cfd0aa14e9d4b342c8b5ef5e7
pythonic API to set initial weights of a model from a model zoo item
for example, loading from existing bundle:
the
load_state_dict
should implement the logic of filtering and assigning parameters, similar to this existing implementation in DenseNet:https://github.com/Project-MONAI/MONAI/blob/e15da1ca3f0651faf3bc75c8274f417acc2c27b1/monai/networks/nets/densenet.py#L266-L281