| 2076 | } |
| 2077 | |
| 2078 | void TfLiteParserImpl::ParseMinimum(size_t subgraphIndex, size_t operatorIndex) |
| 2079 | { |
| 2080 | CHECK_MODEL(m_Model, subgraphIndex, operatorIndex); |
| 2081 | |
| 2082 | auto inputs = GetInputs(m_Model, subgraphIndex, operatorIndex); |
| 2083 | CHECK_VALID_SIZE(inputs.size(), 2); |
| 2084 | |
| 2085 | auto outputs = GetOutputs(m_Model, subgraphIndex, operatorIndex); |
| 2086 | CHECK_VALID_SIZE(outputs.size(), 1); |
| 2087 | |
| 2088 | auto layerName = fmt::format("Minimum:{}:{}", subgraphIndex, operatorIndex); |
| 2089 | |
| 2090 | TensorInfo inputTensorInfo = InputTensorInfo(subgraphIndex, operatorIndex, 0); |
| 2091 | TensorInfo input1TensorInfo = InputTensorInfo(subgraphIndex, operatorIndex, 1); |
| 2092 | CheckMatchingQuantization(inputTensorInfo, input1TensorInfo, layerName, "Input 0", "Input 1"); |
| 2093 | |
| 2094 | IConnectableLayer* layer = m_Network->AddElementwiseBinaryLayer(BinaryOperation::Minimum, layerName.c_str()); |
| 2095 | |
| 2096 | if (!layer) |
| 2097 | { |
| 2098 | throw NullPointerException(fmt::format("Layer {} pointer is null {}", |
| 2099 | operatorIndex, CHECK_LOCATION().AsString())); |
| 2100 | } |
| 2101 | |
| 2102 | TensorInfo outputTensorInfo = OutputTensorInfoFromInputs(subgraphIndex, operatorIndex, layer, 0, {0, 1}); |
| 2103 | CheckMatchingQuantization(inputTensorInfo, outputTensorInfo, layerName, "Input 0", "Output 0"); |
| 2104 | layer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo); |
| 2105 | |
| 2106 | auto inputTensorIndexes = AsUnsignedVector(GetInputTensorIds(m_Model, subgraphIndex, operatorIndex)); |
| 2107 | RegisterInputSlots(subgraphIndex, operatorIndex, layer, {inputTensorIndexes[0], inputTensorIndexes[1]}); |
| 2108 | |
| 2109 | auto outputTensorIndexes = AsUnsignedVector(GetOutputTensorIds(m_Model, subgraphIndex, operatorIndex)); |
| 2110 | RegisterOutputSlots(subgraphIndex, operatorIndex, layer, {outputTensorIndexes[0]}); |
| 2111 | } |
| 2112 | |
| 2113 | void TfLiteParserImpl::ParsePool(size_t subgraphIndex, |
| 2114 | size_t operatorIndex, |
nothing calls this directly
no test coverage detected