Home
last modified time | relevance | path

Searched refs:shape_a (Results 1 – 10 of 10) sorted by relevance

/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dprocess_broadcast_shapes.h90 const RuntimeShape* shape_a = in ProcessBroadcastShapes() local
103 while (i >= 0 && shape_a->Dims(i) == shape_b->Dims(i)) { in ProcessBroadcastShapes()
109 while (i >= 0 && shape_a->Dims(i) == 1) { in ProcessBroadcastShapes()
113 while (i >= 0 && shape_a->Dims(i) == shape_b->Dims(i)) { in ProcessBroadcastShapes()
114 params->broadcast_shape[2] *= shape_a->Dims(i); in ProcessBroadcastShapes()
119 params->broadcast_shape[1] *= shape_a->Dims(i); in ProcessBroadcastShapes()
122 while (i >= 0 && shape_a->Dims(i) == shape_b->Dims(i)) { in ProcessBroadcastShapes()
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dhorizontal_input_fusion.cc62 bool CompareShapeDimsFromLeftToRight(const Shape& shape_a, in CompareShapeDimsFromLeftToRight() argument
64 if (shape_a.rank() != shape_b.rank()) { in CompareShapeDimsFromLeftToRight()
65 return shape_a.rank() < shape_b.rank(); in CompareShapeDimsFromLeftToRight()
67 auto dims_a = shape_a.dimensions(); in CompareShapeDimsFromLeftToRight()
97 Shape shape_a = GetInputShapeForMultiOutputFusion(*a); in FindAndSortFusionCandidates() local
99 if (!ShapeUtil::EqualIgnoringElementType(shape_a, shape_b)) { in FindAndSortFusionCandidates()
102 return CompareShapeDimsFromLeftToRight(shape_a, shape_b); in FindAndSortFusionCandidates()
/external/tensorflow/tensorflow/python/ops/parallel_for/
Dmath_test.py280 shape_a = (5, 3) if tr_a else (3, 5)
282 shape_a = (2,) + shape_a
287 x = random_ops.random_uniform(shape_a)
305 shape_a = (4, 5, 3) if tr_a else (4, 3, 5)
307 shape_a = (2,) + shape_a
312 x = random_ops.random_uniform(shape_a)
330 shape_a = (2, 3, 5) if broadcast_a else (4, 2, 3, 5)
332 shape_a = (2,) + shape_a if stack_a else shape_a
334 x = random_ops.random_uniform(shape_a)
709 shape_a = (2, 4, 3, 3) if stack_a else (4, 3, 3)
[all …]
/external/tensorflow/tensorflow/lite/experimental/resource/
Dresource_variable_test.cc98 std::vector<int> shape_a = {1}; in TEST() local
100 InitTensor(shape_a, kTfLiteDynamic, 1.0, &tensor_a); in TEST()
139 std::vector<int> shape_a = {1}; in TEST() local
141 InitTensor(shape_a, kTfLiteDynamic, 1.0, &tensor_a); in TEST()
/external/tensorflow/tensorflow/compiler/jit/
Dpartially_decluster_pass_test.cc300 Output shape_a = ops::Placeholder(s.WithOpName("shape_a"), DT_INT32, in TEST() local
304 Output shape = ops::Add(s.WithOpName("shape"), shape_a, shape_b); in TEST()
352 Output shape_a = ops::Placeholder(s.WithOpName("shape_a"), DT_INT32, in TEST() local
356 Output shape = ops::Add(s.WithOpName("shape"), shape_a, shape_b); in TEST()
377 Output shape_a = ops::Placeholder(s.WithOpName("shape_a"), DT_INT32, in TEST() local
381 Output shape = ops::Add(s.WithOpName("shape"), shape_a, shape_b); in TEST()
/external/tensorflow/tensorflow/core/grappler/costs/
Dgraph_properties_test.cc1808 const auto shape_a = properties.GetOutputProperties("a").at(0).shape(); in TEST_F() local
1810 EXPECT_EQ(2, shape_a.dim_size()); in TEST_F()
1811 EXPECT_EQ(shape_a.dim_size(), shape_c.dim_size()); in TEST_F()
1812 EXPECT_GE(-2, shape_a.dim(0).size()); in TEST_F()
1813 EXPECT_EQ(shape_a.dim(0).size(), shape_c.dim(0).size()); in TEST_F()
1814 EXPECT_GE(-2, shape_a.dim(1).size()); in TEST_F()
1815 EXPECT_EQ(shape_a.dim(1).size(), shape_c.dim(1).size()); in TEST_F()
1817 PartialTensorShape shape(shape_a); in TEST_F()
1826 EXPECT_NE(shape_a.dim(0).size(), shape_b.dim(0).size()); in TEST_F()
1837 EXPECT_EQ(shape_f.dim(0).size(), shape_a.dim(0).size()); in TEST_F()
[all …]
/external/tensorflow/tensorflow/python/ops/
Dmath_ops.py4675 shape_a = a.get_shape().as_list()
4676 axes = [i if i >= 0 else i + len(shape_a) for i in axes]
4677 free = [i for i in xrange(len(shape_a)) if i not in axes]
4678 free_dims = [shape_a[i] for i in free]
4679 prod_free = int(np.prod([shape_a[i] for i in free]))
4680 prod_axes = int(np.prod([shape_a[i] for i in axes]))
4683 if (perm != np.arange(len(shape_a))).any():
4694 shape_a = a.get_shape().as_list()
4695 axes = [i if i >= 0 else i + len(shape_a) for i in axes]
4696 free = [i for i in xrange(len(shape_a)) if i not in axes]
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dremote_fused_graph_execute_op_test.cc147 RemoteFusedGraphExecuteInfo::TensorShapeTypeProto& shape_a = in BuildRemoteFusedGraphExecuteInfo() local
149 shape_a.set_dtype(DT_FLOAT); in BuildRemoteFusedGraphExecuteInfo()
/external/tensorflow/tensorflow/compiler/xla/
Dshape_util_test.cc213 Shape shape_a = ShapeUtil::MakeShape(F32, {4, 3}, {true, false}); in TEST() local
214 *shape_a.mutable_layout() = Layout({1, 0}); in TEST()
220 EXPECT_TRUE(ShapeUtil::Compatible(shape_a, shape_a)); in TEST()
221 EXPECT_TRUE(ShapeUtil::Compatible(shape_a, shape_b)); in TEST()
222 EXPECT_TRUE(ShapeUtil::Compatible(shape_a, shape_c)); in TEST()
/external/tensorflow/tensorflow/c/experimental/saved_model/internal/
Dsaved_model_api_test.cc227 const TF_Shape* shape_a = TF_TensorSpecShape(tensor_spec_a); in TEST_P() local
232 EXPECT_EQ(0, TF_ShapeDims(shape_a)); in TEST_P()