Skip to content
Snippets Groups Projects
Commit cfd265eb authored by Maxence Naud's avatar Maxence Naud
Browse files

Fix python binding and add Tensor.hpp in includes for opertors

parent cf4e6f9e
No related branches found
No related tags found
2 merge requests!105version 0.2.0,!88Basic supervised learning
Showing
with 27 additions and 6 deletions
......@@ -11,6 +11,7 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <string>
#include "aidge/operator/Operator.hpp"
#include "aidge/backend/OperatorImpl.hpp"
......@@ -116,7 +117,7 @@ public:
void init_OperatorImpl(py::module& m){
py::class_<OperatorImpl, std::shared_ptr<OperatorImpl>, pyOperatorImpl>(m, "OperatorImpl", py::dynamic_attr())
.def(py::init<const Operator&>(), py::keep_alive<1, 1>(), py::keep_alive<1, 2>())
.def(py::init<const Operator&, const std::string&>(), py::keep_alive<1, 1>(), py::keep_alive<1, 2>())
.def("forward", &OperatorImpl::forward)
.def("backward", &OperatorImpl::backward)
.def("get_nb_required_data", &OperatorImpl::getNbRequiredData)
......
......@@ -12,6 +12,7 @@
#include <pybind11/pybind11.h>
#include "aidge/operator/Add.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/utils/Types.h"
......
......@@ -17,6 +17,7 @@
#include <array>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/AvgPooling.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/utils/Types.h"
......
......@@ -12,6 +12,7 @@
#include <pybind11/pybind11.h>
#include <string>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/BatchNorm.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/utils/Types.h"
......
......@@ -12,6 +12,7 @@
#include <pybind11/pybind11.h>
#include <string>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Concat.hpp"
#include "aidge/operator/OperatorTensor.hpp"
......
......@@ -16,6 +16,7 @@
#include <array>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Conv.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/utils/Types.h"
......
......@@ -17,6 +17,7 @@
#include <array>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/ConvDepthWise.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/utils/Types.h"
......
......@@ -11,6 +11,7 @@
#include <pybind11/pybind11.h>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Div.hpp"
#include "aidge/operator/OperatorTensor.hpp"
......
......@@ -11,6 +11,7 @@
#include <pybind11/pybind11.h>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Erf.hpp"
#include "aidge/operator/OperatorTensor.hpp"
......
......@@ -11,8 +11,9 @@
#include <pybind11/pybind11.h>
#include "aidge/operator/FC.hpp"
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/FC.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/utils/Types.h"
......
......@@ -12,6 +12,7 @@
#include <pybind11/pybind11.h>
#include <string>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Gather.hpp"
#include "aidge/operator/OperatorTensor.hpp"
......
......@@ -15,6 +15,7 @@
#include <stdio.h>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/GenericOperator.hpp"
#include "aidge/operator/OperatorTensor.hpp"
namespace py = pybind11;
......
......@@ -11,6 +11,7 @@
#include <pybind11/pybind11.h>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Identity.hpp"
#include "aidge/operator/Operator.hpp"
......
......@@ -11,6 +11,7 @@
#include <pybind11/pybind11.h>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/LeakyReLU.hpp"
#include "aidge/operator/OperatorTensor.hpp"
......
......@@ -11,8 +11,9 @@
#include <pybind11/pybind11.h>
#include "aidge/operator/MatMul.hpp"
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/MatMul.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/utils/Types.h"
......
......@@ -17,10 +17,10 @@
#include <array>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/MaxPooling.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/utils/Types.h"
#include "aidge/data/Tensor.hpp"
namespace py = pybind11;
namespace Aidge {
......
......@@ -11,6 +11,7 @@
#include <pybind11/pybind11.h>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Mul.hpp"
#include "aidge/operator/OperatorTensor.hpp"
......
......@@ -11,10 +11,12 @@
********************************************************************************/
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Operator.hpp"
#include "aidge/utils/Types.h"
#include <pybind11/stl.h>
namespace py = pybind11;
namespace Aidge {
......
......@@ -10,7 +10,9 @@
********************************************************************************/
#include <pybind11/pybind11.h>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/operator/Operator.hpp"
#include <pybind11/stl.h>
......
......@@ -9,13 +9,14 @@
*
********************************************************************************/
#include <array>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <string>
#include <vector>
#include <array>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Pad.hpp"
#include "aidge/operator/Operator.hpp"
#include "aidge/utils/Types.h"
......
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