Skip to content
Snippets Groups Projects
Commit 38e51f78 authored by aidge bot user's avatar aidge bot user
Browse files

Website build - job: doc:publish-414370 Build logs:...

Website build - job: doc:publish-414370   Build logs: https://gitlab.eclipse.org/eclipse/aidge/aidge/-/jobs/414370
parent 0575e14e
Branches
No related tags found
No related merge requests found
Showing
with 94 additions and 35 deletions
# Sphinx build info version 1 # Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8a140bcfcb0b5d399aaf5546a8d3f59d config: 6601c0b185b46dda2d55106897e0f18f
tags: 645f666f9bcd5a90fca523b33c5a78b7 tags: 645f666f9bcd5a90fca523b33c5a78b7
_images/MnistExamples.png

69.3 KiB

_images/pipeline_1.png

14.8 KiB

_images/pipeline_2.png

15.5 KiB

_images/pipeline_3.png

15.6 KiB

_images/pipeline_4.png

15.6 KiB

_images/pipeline_5.png

15.6 KiB

_images/pipeline_gm.PNG

27.5 KiB

_images/ptq_diagram.png

52.7 KiB

_images/source_Tutorial_load_and_run_31_1.png

6.81 KiB

_images/source_Tutorial_ptq_9_0.png

13.7 KiB

...@@ -108,31 +108,46 @@ Below is an example of a cyclic graph (an LSTM) in Aidge: ...@@ -108,31 +108,46 @@ Below is an example of a cyclic graph (an LSTM) in Aidge:
Powerful graph search & replace engine Powerful graph search & replace engine
--------------------------------------- ---------------------------------------
Aidge introduces a simple and efficient DSL for graph matching, sometimes called "graph regex". It is possible to write complex textual queries to find a quantified or unquantified set of nodes with specific types, attributes and/or relationships between them. This is particularly useful to implement sophisticated pattern-matching heuristics with no effort! Aidge introduces a simple and efficient DSL for graph matching, called "graph regex". It is possible to write complex textual queries to find a quantified or unquantified set of nodes with specific types, attributes and/or relationships between them. This is particularly useful to implement sophisticated pattern-matching heuristics with no effort!
Here is an example of a query that you can do in Aidge: Here is an example of a query that you can do in Aidge:
The use of graph matching involves three distinct phases: the first involves describing the types of nodes, the second involves describing the query to defining the structure of the graph, and the final phase concerns managing the matches.
Describing the node type and ultimately defining the elements that can be used later in the query. There are several methods to define this dictionary. Firstly, the quick method by node type in a reference graph (ex: model):
.. code-block:: python
graph_regex = aidge_core.GraphRegex()
graph_regex.set_key_from_graph(model)
like that, each type of operation in the graphView node (e.g., CONV, FC) is register in the query dictionary and can be used in the graph regex.
It is also possible to define them manually by creating a test:
.. code-block:: python
graph_regex = aidge_core.GraphRegex()
graph_regex.set_node_key("Add","getType($) =='Add'");
The key 'A' then refers to the test of the node type 'Add' in the query, allowing for complex tests on the nodes or their parameters to be created.
Once the tests on the nodes are defined, it's possible to use them to express queries. Queries enable the search for a set of subgraphs within the computation graph. To define a query, we use:
.. code-block:: python .. code-block:: python
graph_regex = aidge_core.GraphRegex() graph_regex = aidge_core.GraphRegex()
graph_regex.add_query("(Pad#?->Conv#|Deconv#->Pad#?)->ReLU#?->Add#1?->ReLU#?->MaxPool#?->ReLU#?") graph_regex.add_query("(Pad#?->Conv#|Deconv#->Pad#?)->ReLU#?->Add#1?->ReLU#?->MaxPool#?->ReLU#?")
graph_regex.add_query(".->Add#1?") graph_regex.add_query(".->Add#1?")
for match in graph_regex.match(model):
aidge_core.GraphView.replace(match, MyCustomIPOperator())
You can define your own node test function as well: Then, it's possible to apply this set of queries to a graph, which returns a set of MatchSolution structures. Each MatchSolution contains the nodes that correspond to the match for each query.
.. code-block:: python .. code-block:: python
for match in graph_regex.match(model):
aidge_core.GraphView.replace(match.at("Add"), MyCustomIPOperator())
def myNodeTestingFunc(node):
...
return predicate
graph_regex = aidge_core.GraphRegex()
graph_regex.set_node_key("test", myNodeTestingFunc)
graph_regex.add_query("Conv->test")
...
See the tutorial `Perform advanced graph matching with the Graph Regular Expression tool <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/dev/examples/tutorials/GraphRegex_tutorial/GraphRegex.ipynb?ref_type=heads>`_ for more information. See the tutorial `Perform advanced graph matching with the Graph Regular Expression tool <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/dev/examples/tutorials/GraphRegex_tutorial/GraphRegex.ipynb?ref_type=heads>`_ for more information.
......
{
"path": "../../../examples/tutorials/Onnx_tutorial/onnx_tuto.ipynb"
}
\ No newline at end of file
{
"path": "../../../examples/tutorials/Database_DataProvider_tutorial/Database.ipynb"
}
\ No newline at end of file
{
"path": "../../../examples/tutorials/export/aidge_to_cpp/export_LeNet/export_lenet_fp32.ipynb"
}
\ No newline at end of file
{
"path": "../../../examples/tutorials/GraphRegex_tutorial/GraphRegex.ipynb",
"extra-media": [
"../../../examples/tutorials/GraphRegex_tutorial/static/"
]
}
\ No newline at end of file
Tutorials Tutorials
========= =========
To get started with Aidge, please follow the `Aidge 101 tutorial <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/dev/examples/tutorials/Aidge_tutorial/load_and_run.ipynb?ref_type=heads>`_. Aidge 101
---------
To get started with Aidge, please follow the Aidge demonstration tutorial.
This tutorial demonstrates the basic features of the Aidge Framework, importing an ONNX, transforming a neural network graph, performing inference and a cpp export. This tutorial demonstrates the basic features of the Aidge Framework, importing an ONNX, transforming a neural network graph, performing inference and a cpp export.
For an advanced usage of the Aidge Framework, please refer to the following tutorials. .. nbgallery::
load_and_run.nblink
Aidge DNN fonctionnalities Aidge DNN fonctionnalities
-------------------------- --------------------------
- `Manipulating databases and creating batches of data <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/dev/examples/tutorials/Database_DataProvider_tutorial/Database.ipynb?ref_type=heads>`_ - Manipulating databases and creating batches of data
- `Train a Deep Neural Network <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/main/examples/tutorials/Learning/learn.ipynb?ref_type=heads>` - Train a Deep Neural Network
- `Provide an operator implementation using Python or atomic operators <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/dev/examples/tutorials/Onnx_tutorial/onnx_tuto.ipynb?ref_type=heads>`_ - Provide an operator implementation using Python or meta-operators
- `Perform advanced graph matching with the Graph Regular Expression tool <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/dev/examples/tutorials/GraphRegex_tutorial/GraphRegex.ipynb?ref_type=heads>`_ - Perform advanced graph matching with the Graph Regular Expression tool
Optimize your DNN with Aidge .. nbgallery::
---------------------------- database.nblink
learning.nblink
ONNX.nblink
graph_regex.nblink
- `Optimize your neural network with Post Training Quantization <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/main/examples/tutorials/PTQ_tutorial/ptq_tuto.ipynb?ref_type=heads>` DNN Optimization
- `Optimize the inference of your neural network with Tiling <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/dev/examples/tutorials/Tiling_tutorial/tiling.ipynb?ref_type=heads>`_ ----------------
Export your DNN with Aidge - Perform post Training Quantization
-------------------------- - Perform Convolution tiling
.. nbgallery::
ptq.nblink
tiling.nblink
- `Add a custom implementation for a cpp export <https://gitlab.eclipse.org/eclipse/aidge/aidge_export_cpp/-/blob/main/examples/add_custom_operator/add_custom_operator.ipynb?ref_type=heads>`_ DNN export
- `Export your DNN with TensorRT <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/dev/examples/tutorials/TRT_Quantization_tutorial/tuto.ipynb?ref_type=heads>`_ ----------
- `Export your DNN for an STM32 <https://gitlab.eclipse.org/eclipse/aidge/aidge_export_arm_cortexm/-/blob/main/examples/export_LeNet/export_lenet_fp32.ipynb?ref_type=heads>`
Contributing to Aidge .. nbgallery::
--------------------- export_cpp.nblink
You will find all information for contributing to Aidge in the `wiki <https://gitlab.eclipse.org/groups/eclipse/aidge/-/wikis/Contributing>`_. - `Exercise on adding a custom implementation for a cpp export <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/main/examples/tutorials/export/aidge_to_cpp/add_custom_operator/add_custom_operator.ipynb?ref_type=heads>`_
For example, you can help us extend our operator coverage by adding an operator and its implementation in the Aidge library. - `Export your DNN with TensorRT <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/main/examples/tutorials/TRT_Quantization_tutorial/tuto.ipynb?ref_type=heads>`_
The `Add an operator and its implementation Tutorial <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/dev/examples/tutorials/Hardmax_operator/operator_adding.ipynb?ref_type=heads>`_ details the steps to follow. - `Export your DNN for an STM32 <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/main/examples/tutorials/export/aidge_to_STM32/export_LeNet/export_lenet_fp32.ipynb?ref_type=heads>`_
If you encounter any difficulty with the Tutorials, please create an issue `here <https://gitlab.eclipse.org/groups/eclipse/aidge/-/issues>`_. Tutorial on adding the C++ Aidge
--------------------------------
.. nbgallery:: You can extend our operator coverage by adding an operator and its implementation in the C++ Aidge library.
load_and_run.nblink The `Add an operator and its implementation Tutorial <https://gitlab.eclipse.org/eclipse/aidge/aidge/-/blob/main/examples/tutorials/Hardmax_operator/operator_adding.ipynb?ref_type=heads>`_ details the steps to follow.
For more information on contributing to Aidge, please refer to the `wiki <https://gitlab.eclipse.org/groups/eclipse/aidge/-/wikis/Contributing>`_.
If you encounter any difficulty with the Tutorials, please create an issue `here <https://gitlab.eclipse.org/groups/eclipse/aidge/-/issues>`_.
{
"path": "../../../examples/tutorials/Learning/learn.ipynb"
}
\ No newline at end of file
{
"path": "../../../examples/tutorials/101_first_step/load_and_run.ipynb",
"extra-media": [
"../../../examples/tutorials/101_first_step/static/"
]
}
\ No newline at end of file
{
"path": "../../../examples/tutorials/PTQ_tutorial/ptq_tuto.ipynb",
"extra-media": [
"../../../examples/tutorials/PTQ_tutorial/static/"
]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment