66b3a4ee6b
Sync public mirror / sync (push) Successful in 27s
Fixed the loss functions for categories and is ready for accuracy calculation on page 129
24 lines
397 B
C++
24 lines
397 B
C++
#pragma once
|
|
|
|
#include "./core/omp_config.h"
|
|
|
|
#include "./utils/vector.h"
|
|
#include "./utils/matrix.h"
|
|
|
|
|
|
namespace neural_networks{
|
|
|
|
template <typename T>
|
|
struct Activation_ReLU{
|
|
|
|
//utils::Matrix<T> inputs;
|
|
utils::Matrix<T> outputs;
|
|
|
|
void forward(const utils::Matrix<T>& inputs){
|
|
outputs = numerics::matclip_low(inputs, T{0});
|
|
}
|
|
};
|
|
|
|
|
|
|
|
} // end namespace neural_networks
|