Forked from
Eclipse Projects / aidge / aidge_core
2848 commits behind the upstream repository.
-
Thibault Allenet authoredThibault Allenet authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
pybind_Recipies.cpp 1.17 KiB
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <string>
#include "aidge/utils/Recipies.hpp"
namespace py = pybind11;
namespace Aidge {
void init_Recipies(py::module &m) {
m.def("fuse_mul_add", &fuseMulAdd, py::arg("nodes"), R"mydelimiter(
Recipie to Fuse MatMul and Add operators into an `aidge.FC` operator.
Parameters
----------
:param nodes: The MatMul and Add nodes to fuse.
:type nodes: list of `aidge.node`
)mydelimiter");
m.def("remove_flatten", &removeFlatten, py::arg("nodes"), R"mydelimiter(
Recipie to remove a flatten operator.
Parameters
----------
:param nodes: The flatten operator to remove.
:type nodes: list of `aidge.node`
)mydelimiter");
}
} // namespace Aidge