8 #ifndef BLACKCAT_NEURALNETWORK_NONLINEAR_H_ 9 #define BLACKCAT_NEURALNETWORK_NONLINEAR_H_ 16 #define BC_NONLINEAR_DEF(TypeName, funcName)\ 17 auto funcName(bc::size_t inputs) {\ 18 return Function<BLACKCAT_DEFAULT_SYSTEM_T,\ 19 typename BLACKCAT_DEFAULT_SYSTEM_T::default_floating_point_type,\ 20 bc::TypeName>(bc::Dim<1>{inputs}); \ 22 template<class ValueType, class SystemTag>\ 23 auto funcName(SystemTag system, bc::size_t inputs) {\ 24 return Function<SystemTag, ValueType, bc::TypeName>(bc::Dim<1>{inputs}); \ 26 template<class SystemTag>\ 27 auto funcName(SystemTag system, bc::size_t inputs) {\ 28 return Function<SystemTag, typename SystemTag::default_floating_point_type, bc::TypeName>(bc::Dim<1>{inputs}); \ 30 template<class ValueType, class SystemTag, int X>\ 31 auto funcName(SystemTag system, bc::Dim<X> inputs) {\ 36 bc::traits::Integer<X>>(inputs); \ 38 template<class SystemTag, int X> \ 39 auto funcName(SystemTag system, bc::Dim<X> inputs) { \ 42 typename SystemTag::default_floating_point_type, \ 44 bc::traits::Integer<X>>(inputs); \ 53 #undef BC_NONLINEAR_DEF auto softplus(bc::size_t inputs)
Definition: nonlinear.h:50
auto tanh(bc::size_t inputs)
Definition: nonlinear.h:47
auto logistic(bc::size_t inputs)
Definition: nonlinear.h:48
auto relu(bc::size_t inputs)
Definition: nonlinear.h:49
#define BC_NONLINEAR_DEF(TypeName, funcName)
Definition: nonlinear.h:16
auto mish(bc::size_t inputs)
Definition: nonlinear.h:51
The Evaluator determines if an expression needs to be greedily optimized.
Definition: algorithms.h:22