Skip to content
Snippets Groups Projects
Commit 541ea019 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Make Sigmoid registrable.

parent 8ee82e64
No related branches found
No related tags found
3 merge requests!279v0.4.0,!253v0.4.0,!163Export refactor
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
namespace Aidge { namespace Aidge {
class Sigmoid_Op : public OperatorTensor, class Sigmoid_Op : public OperatorTensor,
public Registrable<Sigmoid_Op, std::string, std::function<std::unique_ptr<OperatorImpl>(const Sigmoid_Op&)>> { public Registrable<Sigmoid_Op, std::string, std::function<std::shared_ptr<OperatorImpl>(const Sigmoid_Op&)>> {
public: public:
static const std::string Type; static const std::string Type;
...@@ -50,4 +50,4 @@ public: ...@@ -50,4 +50,4 @@ public:
std::shared_ptr<Node> Sigmoid(const std::string& name = ""); std::shared_ptr<Node> Sigmoid(const std::string& name = "");
} }
#endif /* AIDGE_CORE_OPERATOR_SIGMOID_H_ */ #endif /* AIDGE_CORE_OPERATOR_SIGMOID_H_ */
\ No newline at end of file
...@@ -25,6 +25,8 @@ void init_Sigmoid(py::module& m) { ...@@ -25,6 +25,8 @@ void init_Sigmoid(py::module& m) {
.def_static("get_outputs_name", &Sigmoid_Op::getOutputsName) .def_static("get_outputs_name", &Sigmoid_Op::getOutputsName)
.def_readonly_static("Type", &Sigmoid_Op::Type); .def_readonly_static("Type", &Sigmoid_Op::Type);
declare_registrable<Sigmoid_Op>(m, "SigmoidOp");
m.def("Sigmoid", &Sigmoid, py::arg("name") = ""); m.def("Sigmoid", &Sigmoid, py::arg("name") = "");
} }
} // namespace Aidge } // namespace Aidge
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