diff --git a/python_binding/operator/pybind_MetaOperatorDefs.cpp b/python_binding/operator/pybind_MetaOperatorDefs.cpp index c55ec533ac4a58fe816fa935ba69af2311561a4f..9e266cfe216406d89881dd0b9e913edbea7fbaab 100644 --- a/python_binding/operator/pybind_MetaOperatorDefs.cpp +++ b/python_binding/operator/pybind_MetaOperatorDefs.cpp @@ -400,6 +400,18 @@ void declare_LSTMOp(py::module &m) { )mydelimiter"); } +void declare_LeakyResetEnum(py::module &m) { + py::enum_<LeakyReset>(m, "leaky_reset", R"doc( + Enumeration for the Leaky neuron reset mode. + + Subtraction: Membrane potential is subtracted by threshold upon spiking. + ToZero : Membrane potential is forced to 0 upon spiking. + )doc") + .value("subtraction", LeakyReset::Subtraction) + .value("to_zero", LeakyReset::ToZero) + .export_values(); +} + void declare_LeakyOp(py::module &m) { m.def("Leaky", &Leaky, @@ -441,6 +453,7 @@ void init_MetaOperatorDefs(py::module &m) { declare_PaddedMaxPoolingOp<2>(m); // declare_PaddedMaxPoolingOp<3>(m); declare_LSTMOp(m); + declare_LeakyResetEnum(m); declare_LeakyOp(m); py::class_<MetaOperator_Op, std::shared_ptr<MetaOperator_Op>, OperatorTensor>(m, "MetaOperatorOp", py::multiple_inheritance())