Submodules module, percentile)[source]

Prune a compatible model

  • 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


pruned_model – The pruned model

Return type:

PyTorch model


  • 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.