Recommendation Compression ========================== .. autofunction:: netspresso.compressor.__init__.CompressorV2.recommendation_compression Details of Parameters --------------------- Compression Method ~~~~~~~~~~~~~~~~~~ .. autoclass:: netspresso.enums.__init__.CompressionMethod :noindex: Available Compression Method ++++++++++++++++++++++++++++ +------------+----------------------------------+ | Name | Description | +============+==================================+ | PR_L2 | L2 Norm Pruning | +------------+----------------------------------+ | PR_GM | GM Pruning | +------------+----------------------------------+ | PR_NN | Nuclear Norm Pruning | +------------+----------------------------------+ | PR_SNP | Structured Neuron-level Pruning | +------------+----------------------------------+ | FD_TK | Tucker Decomposition | +------------+----------------------------------+ | FD_SVD | Singular Value Decomposition | +------------+----------------------------------+ Example +++++++ .. code-block:: python from netspresso.enums import CompressionMethod COMPRESSION_METHOD = CompressionMethod.PR_L2 .. warning:: - Nuclear Norm is only supported in the Tensorflow-Keras framework. - Structured Neuron-level is only supported in the PyTorch and ONNX frameworks. .. note:: - Click on the link to learn more about the information. (:ref:`compression_method_heading`) Recommendation Method ~~~~~~~~~~~~~~~~~~~~~ .. autoclass:: netspresso.enums.__init__.RecommendationMethod :noindex: Available Recommendation Method +++++++++++++++++++++++++++++++ +------------+---------------------------------------------------------------------+ | Name | Description | +============+=====================================================================+ | SLAMP | Structured Layer-adaptive Sparsity for the Magnitude-based Pruning | +------------+---------------------------------------------------------------------+ | VBMF | Variational Bayesian Matrix Factorization | +------------+---------------------------------------------------------------------+ Example +++++++ .. code-block:: python from netspresso.enums import RecommendationMethod RECOMMENDATION_METHOD = RecommendationMethod.SLAMP .. note:: - If you selected PR_L2, PR_GM, PR_NN, PR_SNP for compression_method - The recommended_method available is **SLAMP**. - If you selected FD_TK, FD_SVD for compression_method - The recommended_method available is **VBMF**. Recommendation Ratio ~~~~~~~~~~~~~~~~~~~~~ .. note:: - SLAMP (Pruning ratio) - Remove corresponding amounts of the filters. (e.g. 0.2 removes 20% of the filters in each layer) - Available ranges .. raw:: html