Home
last modified time | relevance | path

Searched refs:TensorShape (Results 1 – 25 of 226) sorted by relevance

12345678910

/third_party/mindspore/tests/ut/cpp/dataset/
Dtensorshape_test.cc40 TensorShape t(vec); in TEST_F()
58 TensorShape t2({4, 5, 6}); in TEST_F()
60 TensorShape t3({0}); in TEST_F()
63 t3 = TensorShape({0, 5, 6}); in TEST_F()
69 TensorShape t = TensorShape::CreateScalar(); in TEST_F()
73 TensorShape t2(std::vector<dsize_t>{}); in TEST_F()
79 TensorShape t = TensorShape::CreateScalar(); in TEST_F()
83 ASSERT_EQ(t, TensorShape({1, 2, 3})); in TEST_F()
84 TensorShape t2 = TensorShape::CreateScalar(); in TEST_F()
89 TensorShape t3({4, 5, 6}); in TEST_F()
[all …]
Dpad_end_op_test.cc35 TensorShape pad_data_shape({}); in TEST_F()
39 TensorShape input_shape1({2, 2}); in TEST_F()
40 std::vector<TensorShape> input_shape1_vector = {input_shape1}; in TEST_F()
45 TensorShape pad_shape1[3] = {TensorShape({3, 3}), TensorShape({2, 4}), TensorShape({4, 2})}; in TEST_F()
67 std::vector<TensorShape> output_shape = {TensorShape({})}; in TEST_F()
92 TensorShape input_shape2({2}); in TEST_F()
93 std::vector<TensorShape> input_shape2_vector = {input_shape2}; in TEST_F()
98 TensorShape pad_shape2[3] = {TensorShape({5}), TensorShape({2}), TensorShape({10})}; in TEST_F()
114 std::vector<TensorShape> output_shape = {TensorShape({})}; in TEST_F()
Dtensor_test.cc39 Tensor::CreateEmpty(TensorShape({2, 3}), DataType(DataType::DE_UINT64), &t); in TEST_F()
41 ASSERT_EQ(t->shape(), TensorShape({2, 3})); in TEST_F()
71 Tensor::CreateFromVector(x, TensorShape({2, 3}), &t2); in TEST_F()
79 Tensor::CreateEmpty(TensorShape({2, 2}), DataType(DataType::DE_FLOAT32), &t); in TEST_F()
83 Tensor::CreateFromVector(x, TensorShape({2, 2}), &t2); in TEST_F()
89 Tensor::CreateEmpty(TensorShape({2, 2}), DataType(DataType::DE_UINT8), &t); in TEST_F()
91 t->Reshape(TensorShape({4})); in TEST_F()
97 Status rc = t->Reshape(TensorShape({5})); in TEST_F()
100 ASSERT_EQ(t2->shape(), TensorShape({1, 4})); in TEST_F()
102 ASSERT_EQ(t2->shape(), TensorShape({1, 4, 1})); in TEST_F()
[all …]
Dslice_op_test.cc87 Tensor::CreateFromVector(labels, TensorShape({2, 3}), &input); in TEST_F()
99 Tensor::CreateFromVector(out, TensorShape({2, 1}), &expected); in TEST_F()
116 Tensor::CreateFromVector(labels, TensorShape({2, 2, 2}), &input); in TEST_F()
128 Tensor::CreateFromVector(out, TensorShape({1, 2, 2}), &expected); in TEST_F()
145 Tensor::CreateFromVector(labels, TensorShape({2, 2, 2}), &input); in TEST_F()
157 Tensor::CreateFromVector(out, TensorShape({1, 0, 2}), &expected); in TEST_F()
174 Tensor::CreateFromVector(labels, TensorShape({4, 2}), &input); in TEST_F()
183 Tensor::CreateFromVector(out, TensorShape({2, 2}), &expected); in TEST_F()
200 Tensor::CreateFromVector(labels, TensorShape({2, 2, 2}), &input); in TEST_F()
207 Tensor::CreateFromVector(labels, TensorShape({2, 2, 2}), &expected); in TEST_F()
[all …]
Dsliding_window_op_test.cc33 TensorShape shape({static_cast<dsize_t>(strings.size())}); in TEST_F()
44 Tensor::CreateFromVector(out, TensorShape({6, 3}), &expected); in TEST_F()
58 TensorShape shape({static_cast<dsize_t>(strings.size())}); in TEST_F()
61 std::vector<TensorShape> input_shape = {input->shape()}; in TEST_F()
62 std::vector<TensorShape> output_shape = {TensorShape({})}; in TEST_F()
69 ASSERT_TRUE(output_shape[0] == TensorShape({6, 3})); in TEST_F()
Dtensor_string_test.cc40 ASSERT_TRUE(t->shape() == TensorShape({})); in TEST_F()
47 ASSERT_TRUE(t2->shape() == TensorShape({2})); in TEST_F()
55 Tensor::CreateFromVector(strings, TensorShape({2, 3}), &t3); in TEST_F()
57 ASSERT_TRUE(t3->shape() == TensorShape({2, 3})); in TEST_F()
70 …omVector(std::vector<std::string>{"abc", "defg", "hi", "klmno", "123", "789"}, TensorShape({2, 3}), in TEST_F()
96 Tensor::CreateFromVector(strings, TensorShape({2, 3}), &t); in TEST_F()
127 Tensor::CreateEmpty(TensorShape({0}), DataType(DataType::DE_STRING), &t1); in TEST_F()
134 Tensor::CreateFromVector(strings, TensorShape({2, 3}), &t3); in TEST_F()
136 ASSERT_TRUE(t3->shape() == TensorShape({2, 3})); in TEST_F()
160 Tensor::CreateFromVector(strings, TensorShape({2, 3}), &t); in TEST_F()
Dbatch_op_test.cc67 rc = de::Tensor::CreateFromMemory(de::TensorShape({12, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
101 rc = de::Tensor::CreateFromMemory(de::TensorShape({7, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
104 rc = de::Tensor::CreateFromMemory(de::TensorShape({7, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
107 rc = de::Tensor::CreateFromMemory(de::TensorShape({7, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
151 rc = de::Tensor::CreateFromMemory(de::TensorShape({7, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
154 rc = de::Tensor::CreateFromMemory(de::TensorShape({7, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
157 rc = de::Tensor::CreateFromMemory(de::TensorShape({7, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
160 rc = de::Tensor::CreateFromMemory(de::TensorShape({3, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
210 rc = de::Tensor::CreateFromMemory(de::TensorShape({7, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
213 rc = de::Tensor::CreateFromMemory(de::TensorShape({5, 1}), de::DataType(DataType::DE_INT64), in TEST_F()
[all …]
Drandom_crop_and_resize_op_test.cc33 TensorShape s_in = input_tensor_->shape(); in TEST_F()
46 TensorShape s_out({h_out, w_out, s_in[2]}); in TEST_F()
59 TensorShape s_in = input_tensor_->shape(); in TEST_F()
72 TensorShape s_out({h_out, w_out, s_in[2]}); in TEST_F()
85 TensorShape s_in = input_tensor_->shape(); in TEST_F()
98 TensorShape s_out({h_out, w_out, s_in[2]}); in TEST_F()
Dexecute_test.cc47 ASSERT_OK(Tensor::CreateFromVector(labels, TensorShape({2, 10}), &input)); in TEST_F()
65 ASSERT_OK(Tensor::CreateFromVector(labels, TensorShape({2, 10}), &input)); in TEST_F()
113 ASSERT_OK(Tensor::CreateFromVector(labels, TensorShape({2, 2, 2, 3}), &input)); in TEST_F()
132 ASSERT_OK(Tensor::CreateFromVector(labels, TensorShape({2, 10}), &input)); in TEST_F()
152 ASSERT_OK(Tensor::CreateFromVector(labels, TensorShape({20}), &input)); in TEST_F()
201 TensorShape s = TensorShape({6, 2}); in TEST_F()
214 TensorShape s = TensorShape({2, 6}); in TEST_F()
233 TensorShape s = TensorShape({2, freq, frame_num, 2}); in TEST_F()
254 TensorShape s = TensorShape({1, 4, 3, 2}); in TEST_F()
510 ASSERT_OK(Tensor::CreateFromVector(labels, TensorShape({2, 10}), &input)); in TEST_F()
[all …]
Dsolarize_op_test.cc56 …Tensor::CreateFromVector(test_vector, TensorShape({1, (long int)test_vector.size(), 1}), &test_inp… in TEST_F()
57 …Tensor::CreateFromVector(expected_output_vector, TensorShape({1, (long int)test_vector.size(), 1}), in TEST_F()
84 …Tensor::CreateFromVector(test_vector, TensorShape({1, (long int)test_vector.size(), 1}), &test_inp… in TEST_F()
85 …Tensor::CreateFromVector(expected_output_vector, TensorShape({1, (long int)test_vector.size(), 1}), in TEST_F()
109 …Tensor::CreateFromVector(test_vector, TensorShape({1, (long int)test_vector.size(), 1}), &test_inp… in TEST_F()
110 …Tensor::CreateFromVector(expected_output_vector, TensorShape({1, (long int)test_vector.size(), 1}), in TEST_F()
134 …Tensor::CreateFromVector(test_vector, TensorShape({1, (long int)test_vector.size()}), &test_input_… in TEST_F()
135 Tensor::CreateFromVector(expected_output_vector, TensorShape({1, (long int)test_vector.size()}), in TEST_F()
159 …Tensor::CreateFromVector(test_vector, TensorShape({1, (long int)test_vector.size(), 1}), &test_inp… in TEST_F()
Dcutmix_batch_op_test.cc38 …Tensor::CreateEmpty(TensorShape({2, input_tensor_resized->shape()[0], input_tensor_resized->shape(… in TEST_F()
43 …Tensor::CreateFromVector(std::vector<uint32_t>({0, 1, 1, 0}), TensorShape({2, 2}), &batched_labels… in TEST_F()
69 …Tensor::CreateEmpty(TensorShape({2, chw_tensor->shape()[0], chw_tensor->shape()[1], chw_tensor->sh… in TEST_F()
74 …Tensor::CreateFromVector(std::vector<uint32_t>({0, 1, 1, 0}), TensorShape({2, 2}), &batched_labels… in TEST_F()
95 Tensor::CreateFromVector(std::vector<uint32_t>({0, 1, 1, 0}), TensorShape({4}), &labels); in TEST_F()
109 …Tensor::CreateEmpty(TensorShape({2, input_tensor_->shape()[0], input_tensor_->shape()[1], input_te… in TEST_F()
114 …Tensor::CreateFromVector(std::vector<uint32_t>({0, 1, 1, 0}), TensorShape({2, 2}), &batched_labels… in TEST_F()
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/core/
Dtensor_shape.cc32 constexpr dsize_t TensorShape::kDimUnknown;
42 dsize_t TensorShape::NumOfElements() const { in NumOfElements()
49 void TensorShape::Print(std::ostream &out) const { in Print()
68 TensorShape::TensorShape(const std::initializer_list<dsize_t> &list) in TensorShape() function in mindspore::dataset::TensorShape
73 TensorShape::TensorShape(const std::vector<dsize_t> &list) in TensorShape() function in mindspore::dataset::TensorShape
78 TensorShape::TensorShape(const TensorShape &shape) in TensorShape() function in mindspore::dataset::TensorShape
85 TensorShape::TensorShape(py::list l) in TensorShape() function in mindspore::dataset::TensorShape
92 list_c.push_back(TensorShape::kDimUnknown); in TensorShape()
100 TensorShape::TensorShape(cv::MatSize cv_size, uint32_t type) in TensorShape() function in mindspore::dataset::TensorShape
113 TensorShape TensorShape::CreateUnknownRankShape() { in CreateUnknownRankShape()
[all …]
Dtensor_shape.h53 class TensorShape {
58 TensorShape() = delete;
63 explicit TensorShape(const std::initializer_list<dsize_t> &list);
68 explicit TensorShape(const std::vector<dsize_t> &list);
72 TensorShape(const TensorShape &shape);
77 explicit TensorShape(py::list l);
80 ~TensorShape() = default;
84 static TensorShape CreateScalar() { return TensorShape({}); } in CreateScalar()
88 static TensorShape CreateUnknownRankShape();
92 static TensorShape CreateUnknownShapeWithRank(dsize_t rank);
[all …]
Dcv_tensor.cc31 Status CVTensor::CreateEmpty(const TensorShape &shape, DataType type, CVTensorPtr *out) { in CreateEmpty()
53 TensorShape shape({}); in CreateFromMat()
55 shape = TensorShape({mat.rows, mat.cols}); in CreateFromMat()
57 shape = TensorShape({mat.rows, mat.cols, mat.channels()}); in CreateFromMat()
68 std::pair<std::array<int, 2>, int> CVTensor::IsValidImage(const TensorShape &shape, const DataType … in IsValidImage()
97 Status CVTensor::MatInit(uchar *data, const TensorShape &shape, const DataType &type, cv::Mat *mat)… in MatInit()
117 Status CVTensor::Reshape(const TensorShape &shape) { in Reshape()
140 TensorShape remaining({-1}); in MatAtIndex()
Dtensor.h76 Tensor(const TensorShape &shape, const DataType &type);
91 static Status CreateEmpty(const TensorShape &shape, const DataType &type, TensorPtr *out);
100 …static Status CreateFromMemory(const TensorShape &shape, const DataType &type, const uchar *src, T…
109 static Status CreateFromMemory(const TensorShape &shape, const DataType &type, const uchar *src,
139 …static Status CreateFromByteList(const dataengine::BytesList &bytes_list, const TensorShape &shape…
149 …static Status CreateFromByteList(const dataengine::BytesList &bytes_list, const TensorShape &shape,
160 …static Status CreateFromVector(const std::vector<T> &items, const TensorShape &shape, TensorPtr *o… in CreateFromVector()
177 return CreateFromVector(items, TensorShape({static_cast<dsize_t>(items.size())}), out); in CreateFromVector()
185 …static Status CreateFromVector(const std::vector<bool> &items, const TensorShape &shape, TensorPtr… in CreateFromVector()
201 return CreateFromMemory(TensorShape::CreateScalar(), type, item_ptr, out); in CreateScalar()
[all …]
/third_party/mindspore/tests/ut/cpp/parallel/tensor_layout/
Dreshape_layout_transfer_test.cc39 … const TensorShape &in_tensor_shape_shape, const TensorMap &out_tensor_map_shape, in InferUnifiedLayout()
40 … const TensorShape &out_tensor_shape_shape, DeviceArrangement *unified_device_arrangement_shape, in InferUnifiedLayout()
89 const TensorShape &in_tensor_shape, const TensorMap &out_tensor_map, in InferUnifiedLayoutCheck()
90 const TensorShape &out_tensor_shape, in InferUnifiedLayoutCheck()
98 TensorShape unified_tensor_shape; in InferUnifiedLayoutCheck()
113 const TensorShape &in_tensor_shape, const TensorMap &out_tensor_map, in ValidUnifiedLayoutCheck()
114 const TensorShape &out_tensor_shape) { in ValidUnifiedLayoutCheck()
118 TensorShape unified_tensor_shape; in ValidUnifiedLayoutCheck()
133 TensorShape in_tensor_shape = {512, 1024}; in TEST_F()
135 TensorShape out_tensor_shape = {128, 4096}; in TEST_F()
[all …]
Dtensor_layout_test.cc37 const TensorShape &in_tensor_shape_shape, in ReshapeExpandDeviceArrangementTestFunction()
40 const TensorShape &out_tensor_shape_shape) { in ReshapeExpandDeviceArrangementTestFunction()
76 TensorShape tensor_shape = {512, 1024}; in TEST_F()
79 TensorShape tensor_shape_expect = {4, 128, 2, 512}; in TEST_F()
97 TensorShape tensor_shape = {512, 1024}; in TEST_F()
100 TensorShape tensor_shape_expect = {2, 256, 4, 256}; in TEST_F()
117 TensorShape tensor_shape = {512, 1024}; in TEST_F()
120 TensorShape tensor_shape_expect = {4, 128, 1024}; in TEST_F()
138 TensorShape tensor_shape = {512, 1024}; in TEST_F()
141 TensorShape tensor_shape_expect = {512, 4, 256}; in TEST_F()
[all …]
Dredistribution_layout_transfer_test.cc39 const TensorShape &tensor_shape_shape, const DeviceArrangement &out_device_arrangement_shape, in RedistributionLayoutTransferTestFunction()
90 … const TensorShape &tensor_shape, const DeviceArrangement &out_device_arrangement, in RedistributionLayoutCheck()
99 TensorShape unified_tensor_shape; in RedistributionLayoutCheck()
135 TensorShape tensor_shape = {512, 1024}; in TEST_F()
141 TensorShape unified_tensor_shape_expect = {2, 256, 4, 256}; in TEST_F()
170 TensorShape tensor_shape = {512, 1024}; in TEST_F()
176 TensorShape unified_tensor_shape_expect = {2, 2, 128, 1024}; in TEST_F()
185 TensorShape tensor_shape = {512, 1024}; in TEST_F()
191 TensorShape unified_tensor_shape_expect = {2, 2, 128, 1024}; in TEST_F()
200 TensorShape tensor_shape = {512, 1024}; in TEST_F()
[all …]
Dutil_layout_gen_test.h42 std::vector<std::tuple<DeviceArrangement, TensorMap, TensorShape>> *layout_list);
47 const TensorShape &tensor_shape);
50 const TensorShape &tensor_shape);
53 const TensorShape &tensor_shape,
57 … const TensorMap &in_tensor_map, const TensorShape &in_tensor_shape,
59 … const TensorMap &out_tensor_map, const TensorShape &out_tensor_shape);
62 … const TensorShape &in_tensor_shape, const DeviceArrangement &out_device_arrangement,
63 const TensorMap &out_tensor_map, const TensorShape &out_tensor_shape);
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/text/kernels/
Dsliding_window_op.cc26 std::vector<TensorShape> input_shape = {input->shape()}; in Compute()
27 std::vector<TensorShape> output_shape = {TensorShape({})}; in Compute()
34 Status SlidingWindowOp::OutputShape(const std::vector<TensorShape> &inputs, std::vector<TensorShape in OutputShape()
37 TensorShape input_shape = inputs[0]; in OutputShape()
53 outputs.emplace_back(TensorShape(output_shape_initializer)); in OutputShape()
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/
Ddata_schema.cc53 const TensorShape *in_shape) in ColDescriptor()
59 tensor_shape_ = std::make_unique<TensorShape>(*in_shape); in ColDescriptor()
76 tensor_shape_ = in_cd.HasShape() ? std::make_unique<TensorShape>(in_cd.Shape()) : nullptr; in ColDescriptor()
87 tensor_shape_ = in_cd.HasShape() ? std::make_unique<TensorShape>(in_cd.Shape()) : nullptr; in operator =()
109 Status ColDescriptor::MaterializeTensorShape(int32_t num_elements, TensorShape *out_shape) const { in MaterializeTensorShape()
117 *out_shape = TensorShape::CreateScalar(); in MaterializeTensorShape()
120 *out_shape = TensorShape({num_elements}); in MaterializeTensorShape()
136 …int64_t unknown_dim_position = TensorShape::kDimUnknown; // Assume there are no unknown dims to s… in MaterializeTensorShape()
141 …if (requested_shape[i] == TensorShape::kDimUnknown && unknown_dim_position != TensorShape::kDimUnk… in MaterializeTensorShape()
148 if (requested_shape[i] != TensorShape::kDimUnknown) { in MaterializeTensorShape()
[all …]
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/image/
Dhwc_to_chw_op.cc29 Status HwcToChwOp::OutputShape(const std::vector<TensorShape> &inputs, std::vector<TensorShape> &ou… in OutputShape()
33 TensorShape in = inputs[0]; in OutputShape()
34 TensorShape out = TensorShape{in[2], in[0], in[1]}; in OutputShape()
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/data/
Dpad_end_op.h30 explicit PadEndOp(const TensorShape &pad_shape, const std::shared_ptr<Tensor> &pad_value) in PadEndOp()
37 …Status OutputShape(const std::vector<TensorShape> &inputs, std::vector<TensorShape> &outputs) over…
42 TensorShape output_shape_;
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/audio/kernels/
Daudio_utils.cc42 TensorShape out_shape({n}); in Linspace()
68 TensorShape input_shape = input->shape(); in ComplexAngle()
69 TensorShape out_shape({input_shape[0], input_shape[1], input_shape[2]}); in ComplexAngle()
100 TensorShape input_shape = input->shape(); in ComplexAbs()
101 TensorShape out_shape({input_shape[0], input_shape[1], input_shape[2]}); in ComplexAbs()
132 TensorShape input_shape = abs->shape(); in Polar()
133 TensorShape out_shape({input_shape[0], input_shape[1], input_shape[2], 2}); in Polar()
158 TensorShape input_shape = input->shape(); in PadComplexTensor()
161 TensorShape input_shape_with_pad(pad_shape_vec); in PadComplexTensor()
194 TensorShape phase_shape = angle_0->shape(); in Phase()
[all …]
Dcomplex_norm_op.cc33 Status ComplexNormOp::OutputShape(const std::vector<TensorShape> &inputs, std::vector<TensorShape> … in OutputShape()
38 TensorShape out = TensorShape(input_size); in OutputShape()

12345678910