| 36 | // bool getAttribute<int>(OPATTR attrName, int& obj) ; |
| 37 | |
| 38 | static T prelu(T x, T slope) { |
| 39 | // f(x) = slope * x for x < 0, f(x) = x for x >= 0 |
| 40 | if (x < 0) |
| 41 | return (T)slope * x; |
| 42 | else |
| 43 | return (T)x; |
| 44 | } |
| 45 | |
| 46 | tensor<T> compute(tensor<T> &x /*!< : N D tensor input*/, |
| 47 | tensor<T> &slope /*!< : N D tensor input*/) { |
no outgoing calls