Skip to content

Commit

Permalink
docs(user_guide/cnn2snn): document reshape CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsiknos-brainchip authored and Kevin Tsiknos committed Jan 28, 2022
1 parent b9373bd commit d4c189f
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions doc/user_guide/cnn2snn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ Command-line interface
^^^^^^^^^^^^^^^^^^^^^^

In addition to the cnn2snn programming API, the CNN2SNN toolkit also provides a
command-line interface to perform quantization and conversion to an Akida NSoC
compatible model.
command-line interface to perform quantization, conversion to an Akida NSoC
compatible model or model reshape.

Quantizing a standard Keras model or a CNN2SNN quantized model using the CLI
makes use of the ``cnn2snn.quantize`` Python function. The same arguments, i.e.
Expand Down Expand Up @@ -168,6 +168,22 @@ Convert a quantized model with input scaling of (255, 0) and with sparse inputs:
cnn2snn convert -m model_keras_iq2_wq2_aq2.h5 -sc 255 -sh 0 -sp True
A model can be reshaped (change of input shape) using CNN2SNN CLI that makes
use of the ``cnn2snn.transforms.reshape`` function. This will only apply to
Sequential models, a `sequentialize helper
<../api_reference/cnn2snn_apis.html#cnn2snn.transforms.sequentialize>`__ is
provided for convenience.

**Examples**

Reshape a model to 160x96:

.. code-block:: bash
cnn2snn reshape -m model_keras.h5 -iw 160 -ih 96
A reshaped model will be saved as ``model_keras_160_96.h5``.

Layers Considerations
---------------------

Expand Down

0 comments on commit d4c189f

Please sign in to comment.