Updating all but last conv layer of UNet #5246
-
I'm using the basic 3D UNet model from MONAI. during training, I want to get and update all the weights of the model except the final conv layer (similar to doing federated averaging). When I print the model layer names, I see the submodules named as model.[0/1/2].[submodule/0].layername what layer names will need to be changed that correspond to the final conv layer of the network, keeping in mind the residual connections? For example, for the standard 3D UNet, the layer names are as follows:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I believe
are the final convolutions. for setting up an optimiser for some of the trainable parameters, please see |
Beta Was this translation helpful? Give feedback.
-
When using |
Beta Was this translation helpful? Give feedback.
I believe
are the final convolutions.
for setting up an optimiser for some of the trainable parameters, please see
Alternative transfer learning setup
of the transfer learning tutorial https://github.com/Project-MONAI/tutorials/blob/main/modules/transfer_mmar.ipynb,from monai.networks.utils import copy_model_state
has an option of excluding parameters by variable name regular expression filtering.