Skip to content

Commit

Permalink
[Docs] Update STM32 export and pruning documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoineau committed Jan 11, 2023
1 parent 8a4823c commit 56ffa3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions docs/export/CPP_STM32.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Export: C++/STM32
=================

**N2D2-IP only: available upon request.**

Export type: ``CPP_STM32``
C++ export for STM32.

Expand Down
14 changes: 7 additions & 7 deletions docs/quant/pruning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ Example with Python
:members:
:inherited-members:

Example of code to use the *PruneCell* in your scripts:
Example of code to use the :py:class:`n2d2.quantizer.PruneCell` in your scripts:

.. code-block:: python
for cell in model:
### Add Pruning ###
if isinstance(cell, n2d2.cells.Conv) or isinstance(cell, n2d2.cells.Fc):
cell.quantizer = n2d2.quantizer.PruneCell(prune_mode="Static", threshold=0.3, prune_filler="IterNonStruct")
### Add Pruning ###
if isinstance(cell, n2d2.cells.Conv) or isinstance(cell, n2d2.cells.Fc):
cell.quantizer = n2d2.quantizer.PruneCell(prune_mode="Static", threshold=0.3, prune_filler="IterNonStruct")
Some explanations with the differents options of the *PruneCell*:
Some explanations with the differents options of the :py:class:`n2d2.quantizer.PruneCell` :

Pruning mode
^^^^^^^^^^^^
Expand All @@ -42,7 +42,7 @@ For example, to update each two epochs, write:
n2d2.quantizer.PruneCell(prune_mode="Gradual", threshold=0.3, stepsize=2*DATASET_SIZE)
Where *DATASET_SIZE* is the size of the dataset you are using.
Where ``DATASET_SIZE`` is the size of the dataset you are using.

Pruning filler
^^^^^^^^^^^^^^
Expand All @@ -53,7 +53,7 @@ Pruning filler
- IterNonStruct: all weights below than the ``delta`` factor are pruned. If this is not enough to reach ``threshold``, all the weights below 2 "delta" are pruned and so on...


**Important**: With *PruneCell*, ``quant_mode`` and ``range`` are not used.
**Important**: With :py:class:`n2d2.quantizer.PruneCell`, ``quant_mode`` and ``range`` are not used.


Example with INI file
Expand Down

0 comments on commit 56ffa3f

Please sign in to comment.