28 lines
414 B
C++
28 lines
414 B
C++
#pragma once
|
|
|
|
#include "./core/omp_config.h"
|
|
|
|
#include "./utils/vector.h"
|
|
#include "./utils/matrix.h"
|
|
#include "./utils/random.h"
|
|
|
|
|
|
namespace neural_networks{
|
|
|
|
template <typename T>
|
|
struct activation_ReLU{
|
|
|
|
utils::Matrix<T> outputs;
|
|
|
|
void forward(utils::Matrix<T> inputs){
|
|
outputs = numerics::max(inputs, T{0});
|
|
//outputs.print();
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace neural_networks
|