@@ -545,8 +545,8 @@ template <class data_T, class res_T, typename CONFIG_T> void hard_tanh(ac_channe
545545// *************************************************
546546// Leaky RELU Activation
547547// *************************************************
548- template <class data_T , class res_T , typename CONFIG_T>
549- void leaky_relu (ac_channel<data_T> &data, typename data_T::value_type alpha, ac_channel<res_T> &res) {
548+ template <class data_T , class param_T , class res_T , typename CONFIG_T>
549+ void leaky_relu (ac_channel<data_T> &data, param_T alpha, ac_channel<res_T> &res) {
550550LeakyReLUActLoop:
551551 for (int i = 0 ; i < CONFIG_T::n_in / res_T::size; i++) {
552552 // #pragma HLS PIPELINE
@@ -571,8 +571,8 @@ void leaky_relu(ac_channel<data_T> &data, typename data_T::value_type alpha, ac_
571571// Thresholded RELU Activation
572572// *************************************************
573573
574- template <class data_T , class res_T , typename CONFIG_T>
575- void thresholded_relu (ac_channel<data_T> &data, typename data_T::value_type theta, ac_channel<res_T> &res) {
574+ template <class data_T , class param_T , class res_T , typename CONFIG_T>
575+ void thresholded_relu (ac_channel<data_T> &data, param_T theta, ac_channel<res_T> &res) {
576576ThresholdedReLUActLoop:
577577 for (int i = 0 ; i < CONFIG_T::n_in / res_T::size; i++) {
578578 // #pragma HLS PIPELINE
@@ -720,8 +720,8 @@ template <class data_T, class res_T, typename CONFIG_T> void softsign(ac_channel
720720
721721#ifndef USE_AC_MATH
722722
723- template <class data_T , class res_T , typename CONFIG_T>
724- void elu (ac_channel<data_T> &data, typename data_T::value_type alpha, ac_channel<res_T> &res) {
723+ template <class data_T , class param_T , class res_T , typename CONFIG_T>
724+ void elu (ac_channel<data_T> &data, param_T alpha, ac_channel<res_T> &res) {
725725 // Initialize the lookup table
726726#ifdef __HLS_SYN__
727727 bool initialized = false ;
@@ -763,8 +763,8 @@ void elu(ac_channel<data_T> &data, typename data_T::value_type alpha, ac_channel
763763}
764764
765765#else
766- template <class data_T , class res_T , typename CONFIG_T>
767- void elu (ac_channel<data_T> &data, typename data_T::value_type alpha, ac_channel<res_T> &res) {
766+ template <class data_T , class param_T , class res_T , typename CONFIG_T>
767+ void elu (ac_channel<data_T> &data, param_T alpha, ac_channel<res_T> &res) {
768768EluActLoop:
769769 for (int i = 0 ; i < CONFIG_T::n_in / res_T::size; i++) {
770770 data_T in_data = data.read ();
@@ -845,8 +845,8 @@ template <class data_T, class res_T, typename CONFIG_T> void selu(ac_channel<dat
845845// *************************************************
846846// PReLU Activation
847847// *************************************************
848- template <class data_T , class res_T , typename CONFIG_T>
849- void prelu (ac_channel<data_T> &data, typename data_T::value_type alpha[CONFIG_T::n_in], ac_channel<res_T> &res) {
848+ template <class data_T , class param_T , class res_T , typename CONFIG_T>
849+ void prelu (ac_channel<data_T> &data, const param_T alpha[CONFIG_T::n_in], ac_channel<res_T> &res) {
850850PReLUActLoop:
851851 for (int i = 0 ; i < CONFIG_T::n_in / res_T::size; i++) {
852852 // #pragma HLS PIPELINE
0 commit comments