Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions bnn/nn/activations.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#ifndef BNN_BNN_NN_ACTIVATIONS_HPP
#define BNN_BNN_NN_ACTIVATIONS_HPP

#include <bnn/utils/utils.hpp>
#include <bnn/operations/operators.hpp>

namespace bnn
{
namespace nn
{

using namespace bnn::utils;
using namespace bnn::operators;

template <class data_type>
class Activation: public BNNBase
{

protected:

std::string name;

Operator<data_type>* input;

Operator<data_type>* output;

public:

Activation
(std::string _name);

virtual
void
implementation
();

virtual
TensorCPU<data_type>*
get_input_value
();

virtual
TensorCPU<data_type>*
get_output_value
();

virtual
~Activation
();

};

}
}

#endif
69 changes: 69 additions & 0 deletions bnn/nn/layers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#ifndef BNN_BNN_NN_LAYERS_HPP
#define BNN_BNN_NN_LAYERS_HPP

#include <bnn/utils/utils.hpp>
#include <bnn/core/tensor.hpp>
#include <bnn/operations/operators.hpp>
#include <string>

namespace bnn
{
namespace nn
{

using namespace bnn::utils;
using namespace bnn::core;
using namespace bnn::operators;

template <class data_type>
class Layer: public BNNBase
{

protected:

std::string name;

Operator<data_type>* input;

Operator<data_type>* output;

public:

Layer
(std::string _name);

virtual
void
initialize_parameters
(void (*initializer)(Operator<data_type>* parameters));

virtual
void
implementation
();

virtual
Operator<data_type>*
get_parameters
();

virtual
TensorCPU<data_type>*
get_input_value
();

virtual
TensorCPU<data_type>*
get_output_value
();

virtual
~Layer
();

};

}
}

#endif
Empty file added bnn/nn/layers_impl.hpp
Empty file.
1 change: 0 additions & 1 deletion bnn/operations/operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define BNN_BNN_OPERATIONS_OPERATORS_HPP

#include <string>
#include <unordered_map>
#include <bnn/core/tensor.hpp>
#include <bnn/utils/utils.hpp>

Expand Down
Empty file.
Empty file added bnn/templates/nn/layers.hpp
Empty file.