/ohos5.0/foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime/ops/ |
H A D | layernorm_builder.cpp | 108 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 115 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 124 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 131 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 145 auto inputShape = allTensors[inputsIndex[INPUT_X]]->GetDimensions(); in Build() 153 returnCode = ValidateGammaAndBetaShape(inputsIndex, m_beginNormAxis, allTensors); in Build() 159 SetQuantType(outputsIndex, allTensors); in Build() 180 int64_t beginAxis, const std::vector<std::shared_ptr<NNTensor>>& allTensors) const in ValidateGammaAndBetaShape() 182 auto inputShape = allTensors[inputsIndex[INPUT_X]]->GetDimensions(); in ValidateGammaAndBetaShape() 183 auto gammaShape = allTensors[inputsIndex[INPUT_GAMMA]]->GetDimensions(); in ValidateGammaAndBetaShape() [all …]
|
H A D | conv2d_builder.cpp | 60 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in SetChannel() argument 63 auto weightShape = allTensors[inputsIndex[CONV2D_INPUT_WEIGHT]]->GetDimensions(); in SetChannel() 76 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in SetKernelSize() argument 79 auto weightShape = allTensors[inputsIndex[CONV2D_INPUT_WEIGHT]]->GetDimensions(); in SetKernelSize() 228 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 235 OH_NN_ReturnCode returnCode = SetInputAndOutput(inputsIndex, outputsIndex, allTensors); in Build() 240 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 246 returnCode = SetChannel(inputsIndex, allTensors); in Build() 251 SetKernelSize(inputsIndex, allTensors); in Build() 254 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() [all …]
|
H A D | depthwise_conv2d_native_builder.cpp | 88 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in SetKernelSize() argument 91 auto weightShape = allTensors[inputsIndex[INPUT_WEIGHT]]->GetDimensions(); in SetKernelSize() 186 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in SetInputAndOutput() argument 188 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in SetInputAndOutput() 202 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 209 OH_NN_ReturnCode ret = SetInputAndOutput(inputsIndex, outputsIndex, allTensors); in Build() 214 ret = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 220 auto inputShape = allTensors[inputsIndex[INPUT_X]]->GetDimensions(); in Build() 227 ret = SetKernelSize(inputsIndex, allTensors); in Build() 234 std::shared_ptr<NNTensor> tensor = allTensors[i]; // 参数 tensor in Build() [all …]
|
H A D | conv2d_transpose_builder.cpp | 45 … const std::vector<std::shared_ptr<NNTensor>>& allTensors) in SetInput() argument 47 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in SetInput() 57 auto weightShape = allTensors[inputsIndex[INPUT_WEIGHT]]->GetDimensions(); in SetInput() 70 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in SetKernelSize() argument 72 auto weightShape = allTensors[inputsIndex[INPUT_WEIGHT]]->GetDimensions(); in SetKernelSize() 243 … const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 250 OH_NN_ReturnCode returnCode = SetInput(inputsIndex, outputsIndex, allTensors); in Build() 255 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 261 SetKernelSize(inputsIndex, allTensors); in Build() 264 std::shared_ptr<NNTensor> tensor = allTensors[i]; // 参数 tensor in Build() [all …]
|
H A D | concat_builder.cpp | 57 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 74 OH_NN_ReturnCode returnCode = SetInputsAndOutputs(inputsIndex, outputsIndex, allTensors); in Build() 80 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 87 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 102 SetQuantType(outputsIndex, allTensors); in Build() 111 … const std::vector<std::shared_ptr<NNTensor>>& allTensors) in SetInputsAndOutputs() argument 113 size_t allTensorsSize = allTensors.size(); in SetInputsAndOutputs()
|
H A D | split_builder.cpp | 30 …onst std::vector<uint32_t> &outputsIndex, const std::vector<std::shared_ptr<NNTensor>> &allTensors) in SetInputAndOutput() argument 38 auto allTensorSize = allTensors.size(); in SetInputAndOutput() 59 SetQuantType(outputsIndex, allTensors); in SetInputAndOutput() 127 const std::vector<std::shared_ptr<NNTensor>> &allTensors) in Build() argument 134 OH_NN_ReturnCode returnCode = SetInputAndOutput(inputsIndex, outputsIndex, allTensors); in Build() 140 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 147 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build()
|
H A D | cast_builder.cpp | 37 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 43 auto ret = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPUT_NUM); in Build() 51 ret = CheckParamIndex(paramsIndex, allTensors, PARAM_NUM); in Build() 57 auto castType = allTensors[inputsIndex[INPUT_TYPE]]->GetBuffer(); in Build() 69 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | fullconnection_builder.cpp | 35 … const std::vector<std::shared_ptr<NNTensor>>& allTensors) in SetFullConnectionInput() argument 42 size_t allTensorsSize = allTensors.size(); in SetFullConnectionInput() 173 … const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 180 OH_NN_ReturnCode returnCode = SetFullConnectionInput(inputsIndex, outputsIndex, allTensors); in Build() 186 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 193 std::shared_ptr<NNTensor> tensor = allTensors[i]; // 参数 tensor in Build() 208 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | batchnorm_builder.cpp | 61 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 68 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 77 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 84 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 99 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | div_builder.cpp | 67 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 74 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 82 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 89 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 103 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | eltwise_builder.cpp | 65 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 72 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 81 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 88 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 103 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | mul_builder.cpp | 68 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 75 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 84 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 91 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 108 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | slice_builder.cpp | 66 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 73 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 79 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 86 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 105 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | softmax_builder.cpp | 60 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 67 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 76 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 83 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 99 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | squeeze_builder.cpp | 64 const std::vector<std::shared_ptr<NNTensor>> &allTensors) in Build() argument 71 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 80 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 87 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 103 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | sub_builder.cpp | 70 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 77 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 86 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 93 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 109 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | unsqueeze_builder.cpp | 60 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 66 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 75 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 82 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 97 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | add_builder.cpp | 60 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 67 auto ret = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPUT_NUM); in Build() 76 ret = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 83 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build() 98 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | pow_builder.cpp | 81 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 88 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 97 SetQuantType(outputsIndex, allTensors); in Build() 98 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_MAX_NUM); in Build() 105 std::shared_ptr<NNTensor> tensor = allTensors[i]; in Build()
|
H A D | bias_add_builder.cpp | 33 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 40 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 49 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_NUM); in Build() 56 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | fill_builder.cpp | 37 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 44 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 50 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_NUM); in Build() 60 SetQuantType(outputsIndex, allTensors); in Build()
|
H A D | gather_builder.cpp | 36 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in Build() argument 43 …OH_NN_ReturnCode returnCode = CheckIOIndex(inputsIndex, outputsIndex, allTensors, INPUT_NUM, OUTPU… in Build() 49 returnCode = CheckParamIndex(paramsIndex, allTensors, PARAM_NUM); in Build() 59 SetQuantType(outputsIndex, allTensors); in Build()
|
/ohos5.0/docs/zh-cn/device-dev/reference/hdi-apis/nnrt/ |
H A D | _model_v10.md | 23 | unsigned int[] [inputIndex](#inputindex) | 模型的输入张量在allTensors数组中的下标。 | 24 | unsigned int[] [outputIndex](#outputindex) | 模型的输出张量在allTensors数组中的下标。 | 26 | struct [Tensor](_tensor_v10.md)[] [allTensors](#alltensors) | 模型中所有的张量组成的数组,该数组中包括输入张量,输出张量和常量张量,… 33 ### allTensors subsection 36 struct Tensor [] Model::allTensors 50 模型的输入张量在allTensors数组中的下标。 80 模型的输出张量在allTensors数组中的下标。
|
H A D | _model_v20.md | 23 | unsigned int[] [inputIndex](#inputindex) | 模型的输入张量在allTensors数组中的下标。 | 24 | unsigned int[] [outputIndex](#outputindex) | 模型的输出张量在allTensors数组中的下标。 | 26 | struct [Tensor](_tensor_v20.md)[] [allTensors](#alltensors) | 模型中所有的张量组成的数组,该数组中包括输入张量,输出张量和常量张量,… 33 ### allTensors subsection 36 struct Tensor [] Model::allTensors 50 模型的输入张量在allTensors数组中的下标。 80 模型的输出张量在allTensors数组中的下标。
|
/ohos5.0/foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime/ |
H A D | ops_builder.cpp | 60 const std::vector<std::shared_ptr<NNTensor>>& allTensors, in CheckIOIndex() argument 75 size_t allTensorsSize = allTensors.size(); in CheckIOIndex() 96 … const std::vector<std::shared_ptr<NNTensor>>& allTensors, in CheckParamIndex() argument 105 size_t allTensorsSize = allTensors.size(); in CheckParamIndex() 118 const std::vector<std::shared_ptr<NNTensor>>& allTensors) in SetQuantType() argument 120 if (allTensors[outputsIndex.front()]->IsQuantTensor()) { in SetQuantType()
|