Home
last modified time | relevance | path

Searched refs:output_tensor_ (Results 1 – 25 of 72) sorted by relevance

123

/third_party/mindspore/mindspore/lite/micro/coder/opcoders/base/
Dquant_dtype_cast_coder.cc29 output_tensor_->data_type() != static_cast<TypeId>(param->dstT)) { in Prepare()
40 if (input_tensor_->quant_params().empty() && output_tensor_->quant_params().empty()) { in DoCode()
44 …auto quant_arg = (!output_tensor_->quant_params().empty() && output_tensor_->quant_params().at(0).… in DoCode()
45 ? output_tensor_->quant_params().at(0) in DoCode()
59 …code.CodeFunction("DoDequantizeInt8ToFp32", input_tensor_, output_tensor_, quant_arg.scale, quant_… in DoCode()
66 …code.CodeFunction("DoQuantizeFp32ToInt8", input_tensor_, output_tensor_, quant_arg.scale, quant_ar… in DoCode()
69 code.CodeFunction("Int8ToUInt8", input_tensor_, output_tensor_, num_unit_thread); in DoCode()
71 …code.CodeFunction("DoDequantizeUInt8ToFp32", input_tensor_, output_tensor_, quant_arg.scale, quant… in DoCode()
74 …code.CodeFunction("DoQuantizeFp32ToUInt8", input_tensor_, output_tensor_, quant_arg.scale, quant_a… in DoCode()
77 code.CodeFunction("UInt8ToInt8", input_tensor_, output_tensor_, num_unit_thread); in DoCode()
Ddtype_cast_coder.cc43 TypeId output_data_type = output_tensor_->data_type(); in DoCode()
70 std::string output_str = allocator_->GetRuntimeAddr(output_tensor_); in DoCode()
77 code.CodeFunction("Float32ToInt32", input_tensor_, output_tensor_, data_num); in DoCode()
79 code.CodeFunction("Float32ToFp16", input_tensor_, output_tensor_, data_num); in DoCode()
87 code.CodeFunction("Uint8ToFloat32", input_tensor_, output_tensor_, data_num); in DoCode()
90 code.CodeFunction("Int32ToFloat32", input_tensor_, output_tensor_, data_num); in DoCode()
93 code.CodeFunction("Fp16ToFloat32", input_tensor_, output_tensor_, data_num); in DoCode()
/third_party/mindspore/tests/ut/cpp/dataset/
Dcrop_op_test.cc30 std::shared_ptr<Tensor> output_tensor_; member in MindDataTestCropOp
40 Status s = op->Compute(input_tensor_, &output_tensor_); in TEST_F()
43 actual = output_tensor_->shape()[0] * output_tensor_->shape()[1] * output_tensor_->shape()[2]; in TEST_F()
45 EXPECT_EQ(crop_height, output_tensor_->shape()[0]); in TEST_F()
58 Status s = op->Compute(input_tensor_, &output_tensor_); in TEST_F()
71 Status s = op->Compute(input_tensor_, &output_tensor_); in TEST_F()
Dcut_out_op_test.cc30 std::shared_ptr<Tensor> output_tensor_; member in MindDataTestCutOutOp
38 Status s = op->Compute(input_tensor_, &output_tensor_); in TEST_F()
39 EXPECT_EQ(input_tensor_->shape()[0], output_tensor_->shape()[0]); in TEST_F()
40 EXPECT_EQ(input_tensor_->shape()[1], output_tensor_->shape()[1]); in TEST_F()
41 EXPECT_EQ(input_tensor_->shape()[2], output_tensor_->shape()[2]); in TEST_F()
Dpad_op_test.cc30 std::shared_ptr<Tensor> output_tensor_; member in MindDataTestPadOp
37 Status s = op->Compute(input_tensor_, &output_tensor_); in TEST_F()
40 actual = output_tensor_->shape()[0] * output_tensor_->shape()[1] * output_tensor_->shape()[2]; in TEST_F()
Dswap_red_blue_test.cc30 std::shared_ptr<Tensor> output_tensor_; member in MindDataTestSwapRedBlueOp
38 Status s = op->Compute(input_tensor_, &output_tensor_); in TEST_F()
41 actual = output_tensor_->shape()[0] * output_tensor_->shape()[1] * output_tensor_->shape()[2]; in TEST_F()
Drgba_to_bgr_op_test.cc33 std::shared_ptr<Tensor> output_tensor_; member in MindDataTestRgbaToBgrOp
54 Status s = op->Compute(rgba_input, &output_tensor_); in TEST_F()
57 actual = output_tensor_->shape()[0] * output_tensor_->shape()[1] * output_tensor_->shape()[2]; in TEST_F()
Drgba_to_rgb_op_test.cc33 std::shared_ptr<Tensor> output_tensor_; member in MindDataTestRgbaToRgbOp
54 Status s = op->Compute(rgba_input, &output_tensor_); in TEST_F()
57 actual = output_tensor_->shape()[0] * output_tensor_->shape()[1] * output_tensor_->shape()[2]; in TEST_F()
Drandom_solarize_op_test.cc32 std::shared_ptr<Tensor> output_tensor_; member in MindDataTestRandomSolarizeOp
45 Status s = op->Compute(input_tensor_, &output_tensor_); in TEST_F()
48 CheckImageShapeAndData(output_tensor_, kRandomSolarize); in TEST_F()
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/int8/
Ddiv_int8_coder.cc39 param_.out_args_.scale_ = output_tensor_->quant_params().front().scale; in Prepare()
40 param_.out_args_.zp_ = output_tensor_->quant_params().front().zeroPoint; in Prepare()
54 int element_num = output_tensor_->ElementsNum(); in DoCode()
58 tile_para.ndim_ = output_tensor_->shape().size(); in DoCode()
64 tile_para.out_shape_[i] = output_tensor_->DimensionSize(i); in DoCode()
66 …tile0_data_ = static_cast<int8_t *>(allocator_->Malloc(kNumberTypeInt8, output_tensor_->Size(), kW… in DoCode()
67 …tile1_data_ = static_cast<int8_t *>(allocator_->Malloc(kNumberTypeInt8, output_tensor_->Size(), kW… in DoCode()
72 code.CodeFunction("DivInt8", tile0_data_, tile1_data_, output_tensor_, element_num, "&param"); in DoCode()
74 code.CodeFunction("DivInt8", input0, input1, output_tensor_, element_num, "&param"); in DoCode()
Dsub_int8_coder.cc41 param_.out_args_.scale_ = output_tensor_->quant_params().front().scale; in Prepare()
42 param_.out_args_.zp_ = output_tensor_->quant_params().front().zeroPoint; in Prepare()
78 auto element_num = output_tensor_->ElementsNum(); in DoCode()
82 tile_para.ndim_ = output_tensor_->shape().size(); in DoCode()
86 tile_para.out_shape_[i] = output_tensor_->DimensionSize(i); in DoCode()
88 …tile0_data_ = static_cast<int8_t *>(allocator_->Malloc(kNumberTypeInt8, output_tensor_->Size(), kW… in DoCode()
90 …tile1_data_ = static_cast<int8_t *>(allocator_->Malloc(kNumberTypeInt8, output_tensor_->Size(), kW… in DoCode()
96 code.CodeFunction("SubInt8", tile0_data_, tile1_data_, output_tensor_, element_num, "&param"); in DoCode()
98 code.CodeFunction("SubInt8", input0, input1, output_tensor_, element_num, "&param"); in DoCode()
Dresize_int8_coder.cc51 quant_out_->zp_ = output_tensor_->quant_params().at(0).zeroPoint; in Prepare()
52 quant_out_->scale_ = output_tensor_->quant_params().at(0).scale; in Prepare()
81 …code.CodeArray("output_shape", output_tensor_->shape().data(), output_tensor_->shape().size(), tru… in DoCode()
92 …code.CodeBaseStruct("ResizeInt8Args", kRunArgs, input_tensor_, output_tensor_, "input_shape", "out… in DoCode()
104 …code.CodeFunction("ResizeNearestNeighborInt8", input_tensor_, output_tensor_, "input_shape", "outp… in DoCode()
Dconcat_int8_coder.cc50 auto out_quant_args = output_tensor_->quant_params(); in Prepare()
72 for (int i = 0; i < axis_ && i < static_cast<int>(output_tensor_->shape().size()); i++) { in Prepare()
73 before_axis_size *= output_tensor_->DimensionSize(i); in Prepare()
77 int output_dim = static_cast<int>(output_tensor_->shape().size()); in Prepare()
81 output_tensor_->shape().data(), sizeof(int) * output_dim), in Prepare()
115 output_tensor_->shape().size()); in DoCode()
116 …code.CodeBaseStruct<false>("ConcatInt8Args", kRunArgs, "input_data", output_tensor_, "&concat_para… in DoCode()
Dadd_int8_coder.cc48 para_.out_zp_ = output_tensor_->quant_params().front().zeroPoint; in Init()
52 const double out_scale = output_tensor_->quant_params().front().scale; in Init()
84 elements_num_ = output_tensor_->ElementsNum(); in ReSize()
106 for (size_t i = 0; i < output_tensor_->shape().size(); i++) { in ReSize()
109output_tensor_->shape().data(), output_tensor_->shape().size() * sizeof(int)), in ReSize()
157 support_opt_add_, input0, input1, output_tensor_); in DoCode()
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/fp32/
Dactivation_fp32_coder.cc44 code.CodeFunction("Fp32Relu", input_tensor_, count, output_tensor_); in DoCode()
47 code.CodeFunction("Fp32Relu6", input_tensor_, count, output_tensor_); in DoCode()
50 … code.CodeFunction("LRelu", input_tensor_, count, output_tensor_, activation_parameter->alpha_); in DoCode()
53 code.CodeFunction("Sigmoid", input_tensor_, count, output_tensor_); in DoCode()
56 code.CodeFunction("Tanh", input_tensor_, count, output_tensor_); in DoCode()
59 code.CodeFunction("HSwish", input_tensor_, count, output_tensor_); in DoCode()
Dpooling_fp32_coder.cc37 pooling_parameter->output_batch_ = output_tensor_->Batch(); in DoCode()
38 pooling_parameter->output_channel_ = output_tensor_->Channel(); in DoCode()
39 pooling_parameter->output_h_ = output_tensor_->Height(); in DoCode()
40 pooling_parameter->output_w_ = output_tensor_->Width(); in DoCode()
71 …code.CodeFunction("MaxPooling", input_tensor_, output_tensor_, "&pooling_parameter", kDefaultTaskI… in DoCode()
73 …code.CodeFunction("AvgPooling", input_tensor_, output_tensor_, "&pooling_parameter", kDefaultTaskI… in DoCode()
Dresize_fp32_coder.cc65 new_height_ = output_tensor_->shape().at(kNHWC_H); in ReSize()
66 new_width_ = output_tensor_->shape().at(kNHWC_W); in ReSize()
142 …return PrepareResizeBilinear(input_shape.data(), output_tensor_->shape().data(), calculate_, coord… in ResizePrepare()
150 …return PrepareResizeBicubic(input_shape.data(), output_tensor_->shape().data(), calculate_, coordi… in ResizePrepare()
166 …code.CodeArray("output_shape", output_tensor_->shape().data(), output_tensor_->shape().size(), tru… in DoCode()
180 …code.CodeFunction("ResizeBilinear", input_tensor_, output_tensor_, "input_shape", "output_shape", … in DoCode()
185 …code.CodeFunction("ResizeNearestNeighbor", input_tensor_, output_tensor_, "input_shape", "output_s… in DoCode()
194 …code.CodeFunction("ResizeBicubic", input_tensor_, output_tensor_, "input_shape", "output_shape", "… in DoCode()
Dtranspose_fp32_coder.cc41 auto out_shape = output_tensor_->shape(); in Resize()
69 auto out_shape = output_tensor_->shape(); in GetNHNCTransposeFunc()
103 code.CodeFunction("memcpy", output_tensor_, input_tensor_, input_tensor_->Size()); in DoCode()
121 …code.CodeFunction(NHNCTransposeFunc_, input_tensor_, output_tensor_, nhnc_param_[0], nhnc_param_[1… in DoCode()
128 dims_ = output_tensor_->shape().size(); in DoCode()
145 …code.CodeFunction("TransposeDimsFp32", input_tensor_, output_tensor_, out_shape_, "dim_size", "pos… in DoCode()
150 code.CodeFunction("DoTransposeFp32", input_tensor_, output_tensor_, out_shape_, "&trans_param"); in DoCode()
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/
Ddwconv_int8_coder.cc54 … output_ch_, pad_x_, pad_y_, stride_x_, stride_y_, bias_tensor_, output_tensor_, "output_shift", in DoCode()
67output_tensor_, "output_shift", "output_mult", output_x_, output_y_, output_offset_, in DoCode()
78output_tensor_, "output_shift", "output_mult", output_x_, output_y_, output_offset_, in DoCode()
107 output_ch_ = output_tensor_->Channel(); in SetParameters()
111 ch_mult_ = output_tensor_->Channel() / input_tensor_->Channel(); in SetParameters()
124 MS_CHECK_TRUE(!output_tensor_->quant_params().empty(), "output quant params shouldn't be empty"); in SetParameters()
125 LiteQuantParam output_quant_arg = output_tensor_->quant_params().at(0); in SetParameters()
127 output_x_ = output_tensor_->Width(); in SetParameters()
128 output_y_ = output_tensor_->Height(); in SetParameters()
Dconv2d_int8_coder.cc62output_tensor_, "output_shift", "output_mult", out_offset_, input_offset_, out_activation_min_, in DoCode()
72 … output_ch_, kernel_x_, pad_x_, stride_x_, bias_tensor_, output_tensor_, "output_shift", in DoCode()
85 … filter_tensor_, output_ch_, pad_x_, pad_y_, stride_x_, stride_y_, bias_tensor_, output_tensor_, in DoCode()
101 MS_CHECK_TRUE(output_tensor_->Channel() == filter_tensor_->DimensionSize(kNHWC_N), in SetParameters()
118 MS_CHECK_TRUE(!output_tensor_->quant_params().empty(), "output quant_params is empty"); in SetParameters()
120 LiteQuantParam output_quant_arg = output_tensor_->quant_params().at(0); in SetParameters()
125 output_x_ = output_tensor_->DimensionSize(kNHWC_W); in SetParameters()
126 output_y_ = output_tensor_->DimensionSize(kNHWC_H); in SetParameters()
127 output_ch_ = output_tensor_->Channel(); in SetParameters()
Dfullconnection_int8_coder.cc31 void FullConnectionInt8Coder::ConfigInputOutput() { output_tensor_->set_format(mindspore::NHWC); } in ConfigInputOutput()
48 output_tensor_, output_activation_min_, output_activation_max_, "NULL"); in DoCode()
54 MS_CHECK_TRUE(output_tensor_->shape().size() == 2, "output tensor size should be 2"); in SetParameters()
57 MS_CHECK_TRUE(!output_tensor_->quant_params().empty(), "output quant_params is empty"); in SetParameters()
60 LiteQuantParam output_quant_arg = output_tensor_->quant_params().at(0); in SetParameters()
73 row_dim_ = output_tensor_->DimensionSize(1); in SetParameters()
Dpooling_int8_coder.cc72 act_max_, ch_src_, input_tensor_, buffer_, output_tensor_); in DoCode()
80 dim_dst_height_ = output_tensor_->DimensionSize(1); in SetParameters()
81 dim_dst_width_ = output_tensor_->DimensionSize(2); in SetParameters()
95 MS_CHECK_TRUE(!output_tensor_->quant_params().empty(), "output quant_params is empty"); in SetParameters()
96 LiteQuantParam output_quant_arg = output_tensor_->quant_params().at(0); in SetParameters()
101 MS_CHECK_TRUE(input_tensor_->Channel() == output_tensor_->Channel(), in SetParameters()
Dmul_int8_coder.cc35 MS_CHECK_TRUE(!output_tensor_->quant_params().empty(), "output quant_params is empty"); in Prepare()
39 out_offset_ = output_tensor_->quant_params().at(0).zeroPoint; in Prepare()
42 const double output_scale = output_tensor_->quant_params().at(0).scale; in Prepare()
70 …ction("arm_elementwise_mul_s8", input1_, input2_, input_1_offset_, input_2_offset_, output_tensor_, in DoCode()
Dadd_int8_coder.cc39 MS_CHECK_TRUE(!output_tensor_->quant_params().empty(), "output quant_params is empty"); in Prepare()
43 out_offset_ = output_tensor_->quant_params().at(0).zeroPoint; in Prepare()
46 const double output_scale = output_tensor_->quant_params().at(0).scale; in Prepare()
89 …input_2_offset_, input_2_mult_, input_2_shift_, left_shift_, output_tensor_, out_offset_, out_mult… in DoCode()
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/string/
Dnormalize.cc39 Tensor output_tensor_; member in mindspore::TestNormalize
41 std::vector<Tensor *> outputs_{&output_tensor_};
52 output_tensor_.set_data(nullptr); in TearDown()
66 output_tensor_.set_data_type(kObjectTypeString); in NormalizeTestInit()
67 output_tensor_.set_format(mindspore::NHWC); in NormalizeTestInit()

123