| 24 | RegisterLayerClass(singacuda_softmax, Softmax); |
| 25 | RegisterLayerClass(singacl_softmax, Softmax); |
| 26 | void Softmax::Setup(const Shape& in_sample, const LayerConf& conf) { |
| 27 | Layer::Setup(in_sample, conf); |
| 28 | CHECK_EQ(in_sample.size(), 1u); |
| 29 | out_sample_shape_ = in_sample; |
| 30 | } |
| 31 | |
| 32 | const Tensor Softmax::Forward(int flag, const Tensor& input) { |
| 33 | CHECK_LE(input.nDim(), 2u); |