Skip to content
Snippets Groups Projects
Commit f030eb56 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Added lambda test

parent 79ed9f83
No related branches found
No related tags found
2 merge requests!152Update Aidge export to take a graph view has an argument instead of a...,!138Alternative graph matching
......@@ -205,4 +205,18 @@ TEST_CASE("[core/graph] Matching") {
{"conv3_pad", {"conv3_conv", "conv3_pad", "relu3"}}
});
}
SECTION(".[test]->Pad") {
auto gm = GraphMatching(g1);
gm.addNodeLambda("test", [](const NodePtr& node) {
return (node->type() == "Add" || (node->type() == "ReLU" && node->name() == "relu1"));
});
const auto results = gm.match(".[test]->Pad");
checkMatches(results, {
{"add", {"add", "conv5_pad"}},
{"relu1", {"relu1", "conv2_pad"}}
});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment