-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivations.h
More file actions
31 lines (26 loc) · 750 Bytes
/
activations.h
File metadata and controls
31 lines (26 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* Non-Linear Activations. */
#ifndef ACTIVATIONS_H
#define ACTIVATIONS_H
#include "src/layer.h"
class Sigmoid: public Activation {
private:
xt::xarray<double> output;
public:
xt::xarray<double> forward(xt::xarray<double> input);
xt::xarray<double> backward(xt::xarray<double> incoming_grad);
};
class ReLU: public Activation {
private:
xt::xarray<double> output;
public:
xt::xarray<double> forward(xt::xarray<double> input);
xt::xarray<double> backward(xt::xarray<double> incoming_grad);
};
class Tanh: public Activation {
private:
xt::xarray<double> output;
public:
xt::xarray<double> forward(xt::xarray<double> input);
xt::xarray<double> backward(xt::xarray<double> incoming_grad);
};
#endif