| 78 | } |
| 79 | |
| 80 | void softmax_cpu(float* input, int n, int batch, int batch_offset, int groups, int stride, float* output) |
| 81 | { |
| 82 | int g, b; |
| 83 | for(b = 0; b < batch; ++b) |
| 84 | { |
| 85 | for(g = 0; g < groups; ++g) |
| 86 | { |
| 87 | softmax(input + b * batch_offset + g, n, stride, output + b * batch_offset + g); |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | namespace TEngine { |
| 93 |