Skip to content
Snippets Groups Projects
Commit 7bb39405 authored by Jerome Hue's avatar Jerome Hue Committed by Maxence Naud
Browse files

Add python binding for spikegen rate function

parent b76754c4
No related branches found
No related tags found
2 merge requests!408[Add] Dropout Operator,!351feat: add rate spikegen for snns
/********************************************************************************
* Copyright (c) 2025 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 "aidge/data/Spikegen.hpp"
#include "aidge/data/Tensor.hpp"
namespace py = pybind11;
namespace Aidge {
void init_Spikegen(py::module &m) {
m.def("spikegen_rate", &spikegenRate,
py::arg("tensor"), py::arg("numSteps"),
"Performs spike rate encoding on a Tensor");
}
} // namespace Aidge
...@@ -32,8 +32,10 @@ void init_OperatorImpl(py::module&); ...@@ -32,8 +32,10 @@ void init_OperatorImpl(py::module&);
void init_Log(py::module&); void init_Log(py::module&);
void init_Operator(py::module&); void init_Operator(py::module&);
void init_OperatorTensor(py::module&); void init_OperatorTensor(py::module&);
void init_Spikegen(py::module&);
void init_StaticAnalysis(py::module&); void init_StaticAnalysis(py::module&);
void init_Abs(py::module&); void init_Abs(py::module&);
void init_Add(py::module&); void init_Add(py::module&);
void init_And(py::module&); void init_And(py::module&);
...@@ -122,6 +124,7 @@ void init_Aidge(py::module& m) { ...@@ -122,6 +124,7 @@ void init_Aidge(py::module& m) {
init_Tensor(m); init_Tensor(m);
init_TensorImpl(m); init_TensorImpl(m);
init_Attributes(m); init_Attributes(m);
init_Spikegen(m);
init_Node(m); init_Node(m);
init_GraphView(m); init_GraphView(m);
......
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