| 107 | } |
| 108 | |
| 109 | std::vector<ComputeTaskDescriptorPtr> SelectSoftmax(const GraphFloat32& graph, |
| 110 | int id, ValueId input_id, |
| 111 | ValueId output_id) { |
| 112 | const auto src_shape = graph.FindInputs(id)[0]->tensor.shape; |
| 113 | if (src_shape.w == 1 && src_shape.h == 1) { |
| 114 | return Softmax1x1(id, input_id, output_id, src_shape.c); |
| 115 | } else { |
| 116 | return Softmax(id, input_id, output_id, src_shape.c); |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | Status RegisterPrimaryOps(const GraphFloat32& graph, const Node* node, |
| 121 | const std::vector<ValueId>& inputs, |
no test coverage detected