diff --git a/bnn/nn/activations.hpp b/bnn/nn/activations.hpp new file mode 100644 index 0000000..32c05ec --- /dev/null +++ b/bnn/nn/activations.hpp @@ -0,0 +1,56 @@ +#ifndef BNN_BNN_NN_ACTIVATIONS_HPP +#define BNN_BNN_NN_ACTIVATIONS_HPP + +#include +#include + +namespace bnn +{ + namespace nn + { + + using namespace bnn::utils; + using namespace bnn::operators; + + template + class Activation: public BNNBase + { + + protected: + + std::string name; + + Operator* input; + + Operator* output; + + public: + + Activation + (std::string _name); + + virtual + void + implementation + (); + + virtual + TensorCPU* + get_input_value + (); + + virtual + TensorCPU* + get_output_value + (); + + virtual + ~Activation + (); + + }; + + } +} + +#endif diff --git a/bnn/nn/layers.hpp b/bnn/nn/layers.hpp new file mode 100644 index 0000000..6cb6ebf --- /dev/null +++ b/bnn/nn/layers.hpp @@ -0,0 +1,69 @@ +#ifndef BNN_BNN_NN_LAYERS_HPP +#define BNN_BNN_NN_LAYERS_HPP + +#include +#include +#include +#include + +namespace bnn +{ + namespace nn + { + + using namespace bnn::utils; + using namespace bnn::core; + using namespace bnn::operators; + + template + class Layer: public BNNBase + { + + protected: + + std::string name; + + Operator* input; + + Operator* output; + + public: + + Layer + (std::string _name); + + virtual + void + initialize_parameters + (void (*initializer)(Operator* parameters)); + + virtual + void + implementation + (); + + virtual + Operator* + get_parameters + (); + + virtual + TensorCPU* + get_input_value + (); + + virtual + TensorCPU* + get_output_value + (); + + virtual + ~Layer + (); + + }; + + } +} + +#endif diff --git a/bnn/nn/layers_impl.hpp b/bnn/nn/layers_impl.hpp new file mode 100644 index 0000000..e69de29 diff --git a/bnn/operations/operators.hpp b/bnn/operations/operators.hpp index 41a6365..00860fb 100644 --- a/bnn/operations/operators.hpp +++ b/bnn/operations/operators.hpp @@ -2,7 +2,6 @@ #define BNN_BNN_OPERATIONS_OPERATORS_HPP #include -#include #include #include diff --git a/bnn/templates/nn/activations.hpp b/bnn/templates/nn/activations.hpp new file mode 100644 index 0000000..e69de29 diff --git a/bnn/templates/nn/layers.hpp b/bnn/templates/nn/layers.hpp new file mode 100644 index 0000000..e69de29