feat: Add SimpleGraphMatching binding function
Context
To replace one layer with another, from a python script, we need to have a binded replacement function. This is the reason for this merge request.
Added/Modified files
-
pybind_Matching.cpp
, add method to replace a node in a graph (added file); -
pybind_core.cpp
, add prototype of SinglePassGraphMatching function (modified file);
How to use in python script
- Example : replace LeakyRelu by Relu
matches = aidge_core.SinglePassGraphMatching(model).match("LeakyReLU")
for m in matches:
aidge_core.GraphView.replace(set([m.graph.root_node()]), set([aidge_core.ReLU()]))
TODO
(List the changes that need to be done to track the progress of the MR, you need to update the list when committing !)
-
NOT DONE -
DONE -
TO DO
Edited by Maxence Naud
Merge request reports
Activity
Filter activity
assigned to @mick94
requested review from @pineapple
added LanguagePyBind StatusReview Ready labels
changed milestone to %aidge_core - v0.4.0
enabled an automatic merge when the pipeline for 980e6d6d succeeds
mentioned in commit d276d6dd
Please register or sign in to reply