/third_party/mindspore/mindspore/lite/test/ut/nnacl/infer/ |
D | depthwise_conv2d_infer_test.cc | 31 inputs[0]->shape_[0] = 5; in TEST_F() 32 inputs[0]->shape_[1] = 4; in TEST_F() 33 inputs[0]->shape_[2] = 4; in TEST_F() 34 inputs[0]->shape_[3] = 6; in TEST_F() 37 inputs[1]->shape_[0] = 6; // in channel in TEST_F() 38 inputs[1]->shape_[1] = 3; in TEST_F() 39 inputs[1]->shape_[2] = 3; in TEST_F() 40 inputs[1]->shape_[3] = 1; // channel_multiplier in TEST_F() 59 ASSERT_EQ(outputs[0]->shape_[0], 5); in TEST_F() 60 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() [all …]
|
D | conv2d_infer_test.cc | 31 inputs[0]->shape_[0] = 5; in TEST_F() 32 inputs[0]->shape_[1] = 4; in TEST_F() 33 inputs[0]->shape_[2] = 4; in TEST_F() 34 inputs[0]->shape_[3] = 6; in TEST_F() 37 inputs[1]->shape_[0] = 20; in TEST_F() 38 inputs[1]->shape_[1] = 3; in TEST_F() 39 inputs[1]->shape_[2] = 3; in TEST_F() 40 inputs[1]->shape_[3] = 6; in TEST_F() 58 ASSERT_EQ(outputs[0]->shape_[0], 5); in TEST_F() 59 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() [all …]
|
D | arithmetic_compare_infer_test.cc | 31 inputs[0]->shape_[0] = 2; in TEST_F() 32 inputs[0]->shape_[1] = 3; in TEST_F() 33 inputs[0]->shape_[2] = 4; in TEST_F() 34 inputs[0]->shape_[3] = 5; in TEST_F() 37 inputs[1]->shape_[0] = 6; in TEST_F() 38 inputs[1]->shape_[1] = 7; in TEST_F() 39 inputs[1]->shape_[2] = 8; in TEST_F() 40 inputs[1]->shape_[3] = 9; in TEST_F() 41 inputs[1]->shape_[4] = 10; in TEST_F() 62 inputs[0]->shape_[0] = 7; in TEST_F() [all …]
|
D | arithmetic_infer_test.cc | 31 inputs[0]->shape_[0] = 2; in TEST_F() 32 inputs[0]->shape_[1] = 3; in TEST_F() 33 inputs[0]->shape_[2] = 4; in TEST_F() 34 inputs[0]->shape_[3] = 5; in TEST_F() 37 inputs[1]->shape_[0] = 6; in TEST_F() 38 inputs[1]->shape_[1] = 7; in TEST_F() 39 inputs[1]->shape_[2] = 8; in TEST_F() 40 inputs[1]->shape_[3] = 9; in TEST_F() 41 inputs[1]->shape_[4] = 10; in TEST_F() 62 inputs[0]->shape_[0] = 7; in TEST_F() [all …]
|
D | concat_infer_test.cc | 31 inputs[0]->shape_[0] = 3; in TEST_F() 32 inputs[0]->shape_[1] = 4; in TEST_F() 35 inputs[1]->shape_[0] = 3; in TEST_F() 36 inputs[1]->shape_[1] = 4; in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[0], 6); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 61 inputs[0]->shape_[0] = 3; in TEST_F() 62 inputs[0]->shape_[1] = 4; in TEST_F() 65 inputs[1]->shape_[0] = 3; in TEST_F() 66 inputs[1]->shape_[1] = 4; in TEST_F() [all …]
|
D | split_infer_test.cc | 31 inputs[0]->shape_[0] = 5; in TEST_F() 32 inputs[0]->shape_[1] = 40; in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[0], 5); in TEST_F() 48 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 50 ASSERT_EQ(outputs[1]->shape_[0], 5); in TEST_F() 51 ASSERT_EQ(outputs[1]->shape_[1], 15); in TEST_F() 53 ASSERT_EQ(outputs[2]->shape_[0], 5); in TEST_F() 54 ASSERT_EQ(outputs[2]->shape_[1], 11); in TEST_F() 69 inputs[0]->shape_[0] = 4; in TEST_F() 70 inputs[0]->shape_[1] = 8; in TEST_F() [all …]
|
D | broadcast_to_infer_test.cc | 31 inputs[0]->shape_[0] = 1; in TEST_F() 32 inputs[0]->shape_[1] = 4; in TEST_F() 37 param->shape_[0] = 5; in TEST_F() 38 param->shape_[1] = 4; in TEST_F() 43 ASSERT_EQ(outputs[0]->shape_[0], 5); in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 59 inputs[0]->shape_[0] = 1; in TEST_F() 60 inputs[0]->shape_[1] = 1; in TEST_F() 61 inputs[0]->shape_[2] = 3; in TEST_F() 66 param->shape_[0] = 3; in TEST_F() [all …]
|
D | gather_nd_infer_test.cc | 31 inputs[0]->shape_[0] = 3; in TEST_F() 32 inputs[0]->shape_[1] = 2; in TEST_F() 33 inputs[0]->shape_[2] = 3; in TEST_F() 36 inputs[1]->shape_[0] = 2; in TEST_F() 37 inputs[1]->shape_[1] = 2; in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[1], 3); in TEST_F() 61 inputs[0]->shape_[0] = 3; in TEST_F() 62 inputs[0]->shape_[1] = 2; in TEST_F() 63 inputs[0]->shape_[2] = 3; in TEST_F() [all …]
|
D | gather_infer_test.cc | 31 inputs[0]->shape_[0] = 18; in TEST_F() 32 inputs[0]->shape_[1] = 3; in TEST_F() 35 inputs[1]->shape_[0] = 2; in TEST_F() 36 inputs[1]->shape_[1] = 3; in TEST_F() 37 inputs[1]->shape_[2] = 2; in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[1], 3); in TEST_F() 48 ASSERT_EQ(outputs[0]->shape_[2], 2); in TEST_F() 49 ASSERT_EQ(outputs[0]->shape_[3], 3); in TEST_F() 64 inputs[0]->shape_[0] = 18; in TEST_F() [all …]
|
D | deconv2d_infer_test.cc | 31 inputs[0]->shape_[0] = 5; in TEST_F() 32 inputs[0]->shape_[1] = 4; in TEST_F() 33 inputs[0]->shape_[2] = 4; in TEST_F() 34 inputs[0]->shape_[3] = 6; in TEST_F() 38 inputs[1]->shape_[0] = 6; in TEST_F() 39 inputs[1]->shape_[1] = 3; in TEST_F() 40 inputs[1]->shape_[2] = 3; in TEST_F() 41 inputs[1]->shape_[3] = 20; in TEST_F() 61 ASSERT_EQ(outputs[0]->shape_[0], 5); in TEST_F() 62 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() [all …]
|
D | pooling_infer_test.cc | 31 inputs[0]->shape_[0] = 21; in TEST_F() 32 inputs[0]->shape_[1] = 58; in TEST_F() 33 inputs[0]->shape_[2] = 58; in TEST_F() 34 inputs[0]->shape_[3] = 3; in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_[0], 21); in TEST_F() 54 ASSERT_EQ(outputs[0]->shape_[1], 29); in TEST_F() 55 ASSERT_EQ(outputs[0]->shape_[2], 29); in TEST_F() 56 ASSERT_EQ(outputs[0]->shape_[3], 3); in TEST_F() 71 inputs[0]->shape_[0] = 21; in TEST_F() 72 inputs[0]->shape_[1] = 14; in TEST_F() [all …]
|
D | resize_infer_test.cc | 31 inputs[0]->shape_[0] = 4; in TEST_F() 32 inputs[0]->shape_[1] = 5; in TEST_F() 33 inputs[0]->shape_[2] = 3; in TEST_F() 34 inputs[0]->shape_[3] = 5; in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[1], 3); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[2], 2); in TEST_F() 48 ASSERT_EQ(outputs[0]->shape_[3], 5); in TEST_F() 63 inputs[0]->shape_[0] = 4; in TEST_F() 64 inputs[0]->shape_[1] = 5; in TEST_F() [all …]
|
D | squeeze_infer_test.cc | 31 inputs[0]->shape_[0] = 2; in TEST_F() 32 inputs[0]->shape_[1] = 1; in TEST_F() 33 inputs[0]->shape_[2] = 3; in TEST_F() 34 inputs[0]->shape_[3] = 1; in TEST_F() 35 inputs[0]->shape_[4] = 4; in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[1], 3); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[2], 4); in TEST_F() 61 inputs[0]->shape_[0] = 2; in TEST_F() 62 inputs[0]->shape_[1] = 1; in TEST_F() [all …]
|
D | depth_to_space_infer_test.cc | 33 inputs[0]->shape_[0] = 1; in TEST_F() 34 inputs[0]->shape_[1] = 1; in TEST_F() 35 inputs[0]->shape_[2] = 1; in TEST_F() 36 inputs[0]->shape_[3] = 12; in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[0], 1); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[1], 2); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[2], 2); in TEST_F() 48 ASSERT_EQ(outputs[0]->shape_[3], 3); in TEST_F() 64 inputs[0]->shape_[0] = 1; in TEST_F() 65 inputs[0]->shape_[1] = 2; in TEST_F() [all …]
|
D | matmul_infer_test.cc | 31 inputs[0]->shape_[0] = 4; in TEST_F() 32 inputs[0]->shape_[1] = 3; in TEST_F() 35 inputs[1]->shape_[0] = 4; in TEST_F() 36 inputs[1]->shape_[1] = 3; in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 62 inputs[0]->shape_[0] = 2; in TEST_F() 63 inputs[0]->shape_[1] = 4; in TEST_F() 64 inputs[0]->shape_[2] = 3; in TEST_F() 67 inputs[1]->shape_[0] = 2; in TEST_F() [all …]
|
D | space_to_batch_nd_infer_test.cc | 32 inputs[0]->shape_[0] = 1; in TEST_F() 33 inputs[0]->shape_[1] = 2; in TEST_F() 34 inputs[0]->shape_[2] = 2; in TEST_F() 35 inputs[0]->shape_[3] = 1; in TEST_F() 51 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 52 ASSERT_EQ(outputs[0]->shape_[1], 1); in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_[2], 1); in TEST_F() 54 ASSERT_EQ(outputs[0]->shape_[3], 1); in TEST_F() 69 inputs[0]->shape_[0] = 1; in TEST_F() 70 inputs[0]->shape_[1] = 2; in TEST_F() [all …]
|
D | space_to_batch_infer_test.cc | 31 inputs[0]->shape_[0] = 1; in TEST_F() 32 inputs[0]->shape_[1] = 2; in TEST_F() 33 inputs[0]->shape_[2] = 2; in TEST_F() 34 inputs[0]->shape_[3] = 1; in TEST_F() 50 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 51 ASSERT_EQ(outputs[0]->shape_[1], 1); in TEST_F() 52 ASSERT_EQ(outputs[0]->shape_[2], 1); in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_[3], 1); in TEST_F() 68 inputs[0]->shape_[0] = 1; in TEST_F() 69 inputs[0]->shape_[1] = 2; in TEST_F() [all …]
|
D | gru_infer_test.cc | 31 inputs[0]->shape_[0] = 4; in TEST_F() 32 inputs[0]->shape_[1] = 5; in TEST_F() 33 inputs[0]->shape_[2] = 6; in TEST_F() 38 inputs[1]->shape_[1] = 9; in TEST_F() 41 inputs[2]->shape_[1] = 9; in TEST_F() 43 inputs[3]->shape_[1] = 18; in TEST_F() 55 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 56 ASSERT_EQ(outputs[0]->shape_[1], 2); in TEST_F() 57 ASSERT_EQ(outputs[0]->shape_[2], 5); in TEST_F() 58 ASSERT_EQ(outputs[0]->shape_[3], 3); in TEST_F() [all …]
|
D | pad_infer_test.cc | 31 inputs[0]->shape_[0] = 2; in TEST_F() 32 inputs[0]->shape_[1] = 3; in TEST_F() 37 inputs[1]->shape_[0] = 1; in TEST_F() 38 inputs[1]->shape_[1] = 4; in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[1], 7); in TEST_F() 62 inputs[0]->shape_[0] = 2; in TEST_F() 63 inputs[0]->shape_[1] = 3; in TEST_F() 76 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 77 ASSERT_EQ(outputs[0]->shape_[1], 7); in TEST_F() [all …]
|
D | batch_to_space_infer_test.cc | 32 inputs[0]->shape_[0] = 4; in TEST_F() 33 inputs[0]->shape_[1] = 1; in TEST_F() 34 inputs[0]->shape_[2] = 1; in TEST_F() 35 inputs[0]->shape_[3] = 1; in TEST_F() 51 ASSERT_EQ(outputs[0]->shape_[0], 1); in TEST_F() 52 ASSERT_EQ(outputs[0]->shape_[1], 2); in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_[2], 2); in TEST_F() 54 ASSERT_EQ(outputs[0]->shape_[3], 1); in TEST_F() 71 inputs[0]->shape_[0] = 4; in TEST_F() 72 inputs[0]->shape_[1] = 1; in TEST_F() [all …]
|
D | unsqueeze_infer_test.cc | 32 inputs[0]->shape_[0] = 4; in TEST_F() 42 ASSERT_EQ(outputs[0]->shape_[0], 1); in TEST_F() 43 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 58 inputs[0]->shape_[0] = 4; in TEST_F() 68 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 69 ASSERT_EQ(outputs[0]->shape_[1], 1); in TEST_F() 84 inputs[0]->shape_[0] = 4; in TEST_F() 93 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 108 inputs[0]->shape_[0] = 4; in TEST_F() 109 inputs[0]->shape_[1] = 5; in TEST_F() [all …]
|
D | reshape_infer_test.cc | 32 inputs[0]->shape_[0] = 2; in TEST_F() 33 inputs[0]->shape_[1] = 3; in TEST_F() 38 parameter->shape_[0] = 6; in TEST_F() 43 ASSERT_EQ(outputs[0]->shape_[0], 6); in TEST_F() 58 inputs[0]->shape_[0] = 2; in TEST_F() 59 inputs[0]->shape_[1] = 3; in TEST_F() 65 inputs[1]->shape_[0] = 1; in TEST_F() 75 ASSERT_EQ(outputs[0]->shape_[0], 6); in TEST_F() 90 inputs[0]->shape_[0] = 2; in TEST_F() 91 inputs[0]->shape_[1] = 3; in TEST_F() [all …]
|
D | mean_infer_test.cc | 32 inputs[0]->shape_[0] = 2; in TEST_F() 33 inputs[0]->shape_[1] = 3; in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 59 inputs[0]->shape_[0] = 2; in TEST_F() 60 inputs[0]->shape_[1] = 3; in TEST_F() 71 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 72 ASSERT_EQ(outputs[0]->shape_[1], 1); in TEST_F() 87 inputs[0]->shape_[0] = 2; in TEST_F() 88 inputs[0]->shape_[1] = 3; in TEST_F() 89 inputs[0]->shape_[2] = 4; in TEST_F() [all …]
|
D | reduce_infer_test.cc | 31 inputs[0]->shape_[0] = 2; in TEST_F() 32 inputs[0]->shape_[1] = 3; in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 59 inputs[0]->shape_[0] = 2; in TEST_F() 60 inputs[0]->shape_[1] = 3; in TEST_F() 72 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 73 ASSERT_EQ(outputs[0]->shape_[1], 1); in TEST_F() 88 inputs[0]->shape_[0] = 2; in TEST_F() 89 inputs[0]->shape_[1] = 3; in TEST_F() 90 inputs[0]->shape_[2] = 4; in TEST_F() [all …]
|
/third_party/mindspore/mindspore/lite/src/ |
D | tensor.cc | 31 : data_type_(data_type), shape_(std::move(shape)), format_(format), category_(category) {} in Tensor() 63 result->shape_ = src_tensor.shape_; in CopyTensor() 91 return data_ == tensor.data_ && shape_ == tensor.shape_ && data_type_ == tensor.data_type_; in operator ==() 95 if (this->shape_.size() != 4 && this->shape_.size() != 2) { in Batch() 108 return this->shape_[0]; in Batch() 111 return this->shape_[3]; in Batch() 113 return this->shape_[2]; in Batch() 115 return this->shape_[1]; in Batch() 123 if (this->shape_.size() != 4 && this->shape_.size() != 2) { in Channel() 132 return this->shape_[1]; in Channel() [all …]
|