beyondml.pt.utils package
Submodules
beyondml.pt.utils.utils module
- beyondml.pt.utils.utils.prune_model(model, percentile)[source]
Prune a compatible model
- Parameters:
model (PyTorch model) – A model that has been developed to have a .layers property containing layers to be pruned
percentile (int) – An integer between 0 and 99 which corresponds to how much to prune the model
- Returns:
pruned_model – The pruned model
- Return type:
PyTorch model
Notes
The model input must have a .layers property to be able to function. Only layers within the .layers property which are recognized as prunable are pruned, via their own .prune() method
Also acts on the model in place, but returns the model for ease of use
Module contents
Some additional utilities for building MANN models in PyTorch.