| 25 | RegisterLayerClass(singacuda_prelu, PReLU); |
| 26 | RegisterLayerClass(singacl_prelu, PReLU); |
| 27 | void PReLU::Setup(const Shape& in_sample, const LayerConf &conf) { |
| 28 | Layer::Setup(in_sample, conf); |
| 29 | out_sample_shape_ = in_sample; |
| 30 | channel_shared_ = conf.prelu_conf().channel_shared(); |
| 31 | format_ = conf.prelu_conf().format(); |
| 32 | // Push back params into param_values_ |
| 33 | for (const auto &spec : conf.param()) param_specs_.push_back(spec); |
| 34 | // param_values_.push_back(a_); |
| 35 | } |
| 36 | |
| 37 | const Tensor PReLU::Forward(int flag, const Tensor &input) { |
| 38 | Tensor output; |