Softmax Layer */
| 1326 | |
| 1327 | /** Softmax Layer */ |
| 1328 | class SoftmaxLayer final : public ILayer |
| 1329 | { |
| 1330 | public: |
| 1331 | /** Construct a softmax layer. |
| 1332 | * |
| 1333 | * @param[in] beta (Optional) Beta value. Default 1.0. |
| 1334 | */ |
| 1335 | SoftmaxLayer(float beta = 1.0f) : _beta(beta) |
| 1336 | { |
| 1337 | } |
| 1338 | |
| 1339 | NodeID create_layer(IStream &s) override |
| 1340 | { |
| 1341 | NodeParams common_params = {name(), s.hints().target_hint}; |
| 1342 | NodeIdxPair input = {s.tail_node(), 0}; |
| 1343 | return GraphBuilder::add_softmax_node(s.graph(), common_params, input, _beta); |
| 1344 | } |
| 1345 | |
| 1346 | private: |
| 1347 | float _beta; |
| 1348 | }; |
| 1349 | |
| 1350 | /** Stack Layer */ |
| 1351 | class StackLayer final : public ILayer |
no outgoing calls
no test coverage detected