Home
last modified time | relevance | path

Searched refs:array_shape (Results 1 – 16 of 16) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/
Dshape_util_test.cc415 Shape array_shape = ShapeUtil::MakeShape(F32, {42, 42, 123}); in TEST() local
417 ShapeUtil::Equal(array_shape, ShapeUtil::GetSubshape(array_shape, {}))); in TEST()
419 array_shape, *ShapeUtil::GetMutableSubshape(&array_shape, {}))); in TEST()
423 ShapeUtil::MakeTupleShape({array_shape, array_shape, array_shape}); in TEST()
427 ShapeUtil::Equal(array_shape, ShapeUtil::GetSubshape(tuple_shape, {0}))); in TEST()
429 ShapeUtil::Equal(array_shape, ShapeUtil::GetSubshape(tuple_shape, {1}))); in TEST()
431 ShapeUtil::Equal(array_shape, ShapeUtil::GetSubshape(tuple_shape, {2}))); in TEST()
435 {array_shape, ShapeUtil::MakeTupleShape({array_shape, array_shape}), in TEST()
437 {ShapeUtil::MakeTupleShape({array_shape, array_shape}), in TEST()
438 array_shape})}); in TEST()
[all …]
Dshape_test.cc84 Shape array_shape = in TEST_F() local
86 EXPECT_EQ("f32[<=23,44,<=55]", array_shape.ToString()); in TEST_F()
88 array_shape.set_dynamic_dimension(2, false); in TEST_F()
89 EXPECT_EQ("f32[<=23,44,55]", array_shape.ToString()); in TEST_F()
/external/tensorflow/tensorflow/compiler/xla/service/
Dpattern_matcher_test.cc84 auto array_shape = ShapeUtil::MakeShape(F32, {2, 3, 4}); in TEST() local
86 EXPECT_TRUE(Match(&array_shape, match::Shape(&matched_shape).IsArray())); in TEST()
87 EXPECT_EQ(matched_shape, &array_shape); in TEST()
88 EXPECT_TRUE(Match(&array_shape, match::Shape().IsDenseArray())); in TEST()
89 EXPECT_FALSE(Match(&array_shape, match::Shape().IsSparseArray())); in TEST()
90 EXPECT_FALSE(Match(&array_shape, match::Shape().IsScalar())); in TEST()
91 EXPECT_FALSE(Match(&array_shape, match::Shape().IsTuple())); in TEST()
92 EXPECT_TRUE(Match(&array_shape, match::Shape().WithElementType(F32))); in TEST()
93 EXPECT_TRUE(Match(&array_shape, match::Shape().WithRank(3))); in TEST()
95 Match(&array_shape, match::Shape().WithSubshape({0}, match::Shape()))); in TEST()
[all …]
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dresolve_constant_concatenation.cc91 const Shape array_shape = input_array->shape(); in ConcatenateTensorBuffers() local
93 for (int i = concatenation_axis; i < array_shape.dimensions_count(); i++) { in ConcatenateTensorBuffers()
94 array_copy_size[count] *= array_shape.dims()[i]; in ConcatenateTensorBuffers()
/external/tensorflow/tensorflow/lite/toco/graph_transformations/tests/
Dfuse_binary_into_following_affine_test.cc49 Shape* array_shape = array.mutable_shape(); in CreateArray() local
50 *(array_shape->mutable_dims()) = shape; in CreateArray()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dlocal_client_execute_test.cc279 const Shape array_shape = ShapeUtil::MakeShape(F32, {2, 2}); in XLA_TEST_F() local
283 ShapeUtil::MakeTupleShape({array_shape, vector_shape}); in XLA_TEST_F()
285 ShapeUtil::MakeTupleShape({vector_shape, array_shape}); in XLA_TEST_F()
325 const Shape array_shape = ShapeUtil::MakeShape(F32, {2, 2}); in XLA_TEST_F() local
329 ShapeUtil::MakeTupleShape({array_shape, vector_shape}); in XLA_TEST_F()
368 const Shape array_shape = ShapeUtil::MakeShape(F32, {2, 2}); in XLA_TEST_F() local
370 ShapeUtil::MakeTupleShape({array_shape, array_shape}); in XLA_TEST_F()
/external/tensorflow/tensorflow/lite/toco/
Dmodel.h2170 bool has_shape() const { return array_shape != nullptr; }
2173 return *array_shape;
2176 if (!array_shape) {
2177 array_shape.reset(new Shape);
2179 return array_shape.get();
2182 void clear_shape() { array_shape = nullptr; }
2258 std::unique_ptr<Shape> array_shape;
Ddump_graphviz.cc279 auto& array_shape = array.shape(); in GetArrayLabel() local
281 for (int dim = 0; dim < array_shape.dimensions_count(); dim++) { in GetArrayLabel()
282 AppendF(&html, "%d", array_shape.dims(dim)); in GetArrayLabel()
283 if (dim + 1 < array_shape.dimensions_count()) { in GetArrayLabel()
Dexport_tensorflow.cc234 const auto& array_shape = array.shape(); in ConvertBoolTensorConst() local
236 for (int i = 0; i < array_shape.dimensions_count(); i++) { in ConvertBoolTensorConst()
237 shape->add_dim()->set_size(array_shape.dims(i)); in ConvertBoolTensorConst()
258 const auto& array_shape = array.shape(); in ConvertIntTensorConst() local
260 for (int i = 0; i < array_shape.dimensions_count(); i++) { in ConvertIntTensorConst()
261 shape->add_dim()->set_size(array_shape.dims(i)); in ConvertIntTensorConst()
307 const auto& array_shape = array.shape(); in ConvertComplex64TensorConst() local
309 for (int i = 0; i < array_shape.dimensions_count(); i++) { in ConvertComplex64TensorConst()
310 shape->add_dim()->set_size(array_shape.dims(i)); in ConvertComplex64TensorConst()
Dtooling_util.cc497 const Shape& array_shape = array.shape(); in LogArray() local
498 if (array_shape.dimensions_count() == 0) { in LogArray()
503 for (const int dim : array_shape.dims()) { in LogArray()
/external/tensorflow/tensorflow/compiler/xla/python/
Dxla_client.py486 def array_shape(element_type, dimensions, minor_to_major=None): member in Shape
501 return Shape.array_shape(pyval.dtype, np.shape(pyval))
597 updated = Shape.array_shape(self.element_type(), self.dimensions(),
638 return Shape.array_shape(dtype, dims)
1089 xla_shape = Shape.array_shape(dtype, shape)
1526 shape = Shape.array_shape(self.GetShape(mu).element_type(), dims)
1543 shape = Shape.array_shape(self.GetShape(a).element_type(), dims)
Dxla_client_test.py322 shape_with_layout=xla_client.Shape.array_shape(np.float32, (), ()),
324 xla_client.Shape.array_shape(np.float32, (), ()),
325 xla_client.Shape.array_shape(np.float32, (), ()),
/external/tensorflow/tensorflow/contrib/lite/kernels/internal/
Dtypes.h280 inline tflite::Dims<4> ToRuntimeDims(const tflite::RuntimeShape& array_shape) { in ToRuntimeDims() argument
282 const int dimensions_count = array_shape.DimensionsCount(); in ToRuntimeDims()
287 (i < dimensions_count) ? array_shape.Dims(dimensions_count - 1 - i) : 1; in ToRuntimeDims()
/external/tensorflow/tensorflow/lite/kernels/internal/
Dtypes.h296 inline tflite::Dims<4> ToRuntimeDims(const tflite::RuntimeShape& array_shape) { in ToRuntimeDims() argument
298 const int dimensions_count = array_shape.DimensionsCount(); in ToRuntimeDims()
303 (i < dimensions_count) ? array_shape.Dims(dimensions_count - 1 - i) : 1; in ToRuntimeDims()
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/
Doptimized_ops.h191 const RuntimeShape& array_shape, in AddBiasAndEvalActivationFunction() argument
196 const int array_size = array_shape.FlatSize(); in AddBiasAndEvalActivationFunction()
247 const int array_size = array_shape.FlatSize(); in AddBiasAndEvalActivationFunction()
/external/tensorflow/tensorflow/contrib/lite/kernels/internal/optimized/
Doptimized_ops.h286 const RuntimeShape& array_shape, in AddBiasAndEvalActivationFunction() argument
291 const int array_size = array_shape.FlatSize(); in AddBiasAndEvalActivationFunction()
342 const int array_size = array_shape.FlatSize(); in AddBiasAndEvalActivationFunction()