spyrit.core.train.remove_model_attributes
- spyrit.core.train.remove_model_attributes(source, old_name, target=None)[source]
Remove some attributes of a saved model (nn.module)
- Parameters:
source (str) – Path to the saved model.
old_name (str) – source pattern for the attributes of the model to be removed.
target (str, optional) – Path to model with remaned attributes. The default is source.
- Returns:
None.
Example
Remove the attribute Denoi of the model saved as source. The resulting model is saved as target.pth