MagmaDNN
1.0
c++NeuralNetworkFramework
activationlayer.h
Go to the documentation of this file.
1
9
#include <vector>
10
#include "
layer/layer.h
"
11
#include "
tensor/tensor.h
"
12
#include "
compute/operation.h
"
13
#include "compute/tensor_operations.h"
14
15
namespace
magmadnn
{
16
namespace
layer {
17
18
enum
activation_t {
19
SIGMOID,
20
TANH,
21
RELU,
22
SOFTMAX
23
};
24
25
template
<
typename
T>
26
class
ActivationLayer
:
public
Layer
<T> {
27
public
:
28
ActivationLayer
(
op::Operation<T>
*input, activation_t activation_func);
29
~
ActivationLayer
();
30
31
virtual
std::vector<op::Operation<T> *> get_weights();
32
33
protected
:
34
void
init();
35
36
/* TODO add custom activation function */
37
activation_t activation_func;
38
39
};
40
41
template
<
typename
T>
42
ActivationLayer<T>
* activation(
op::Operation<T>
*input, activation_t activation_func);
43
44
}
// layer
45
}
// magmadnn
layer.h
magmadnn::layer::ActivationLayer
Definition:
activationlayer.h:26
magmadnn
Definition:
addop.cpp:11
tensor.h
operation.h
magmadnn::layer::Layer
Definition:
layer.h:18
magmadnn::op::Operation
Definition:
operation.h:18
include
layer
activation
activationlayer.h
Generated by
1.8.13