Home
last modified time | relevance | path

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

/external/tensorflow/tensorflow/python/framework/
Dcommon_shapes_test.py33 def _assert_incompatible_broadcast(self, shape1, shape2): argument
34 if shape1.dims is not None and shape2.dims is not None:
36 zeros2 = np.zeros(shape2.as_list())
41 self.assertFalse(common_shapes.is_broadcast_compatible(shape1, shape2))
42 self.assertFalse(common_shapes.is_broadcast_compatible(shape2, shape1))
44 common_shapes.broadcast_shape(shape1, shape2)
46 common_shapes.broadcast_shape(shape2, shape1)
50 def _assert_broadcast(self, expected, shape1, shape2): argument
51 if shape1.dims is not None and shape2.dims is not None:
54 zeros2 = np.zeros(shape2.as_list())
[all …]
/external/tensorflow/tensorflow/python/keras/_impl/keras/layers/
Dmerge.py45 def _compute_elemwise_op_output_shape(self, shape1, shape2): argument
61 if None in [shape1, shape2]:
63 elif len(shape1) < len(shape2):
64 return self._compute_elemwise_op_output_shape(shape2, shape1)
65 elif not shape2:
67 output_shape = list(shape1[:-len(shape2)])
68 for i, j in zip(shape1[-len(shape2):], shape2):
79 'together with shapes ' + str(shape1) + ' ' + str(shape2))
481 shape2 = input_shape[1]
482 if shape1 is None or shape2 is None:
[all …]
/external/tensorflow/tensorflow/contrib/training/python/training/
Dbatch_sequences_with_states_test.py67 shape2 = np.array([self.value_length, 3, 4])
71 array_ops.placeholder_with_default(shape2, shape=[3]))
285 shape2 = np.array([self.batch_size, num_unroll, 3, 4])
291 ind2_1, val2_1, shape2)
293 np.empty(shape=[0, 4], dtype=np.int64), np.array([]), shape2)
433 shape2 = np.array([self.batch_size, num_unroll, 3, 4])
439 ind2_1, val2_1, shape2)
441 np.empty(shape=[0, 4], dtype=np.int64), np.array([]), shape2)
484 shape2 = np.array([self.batch_size, num_unroll, 3, 4])
490 ind2_1, val2_1, shape2)
[all …]
/external/tensorflow/tensorflow/core/grappler/costs/
Dgraph_properties.cc440 ShapeHandle shape1, ShapeHandle shape2) { in OutputAsIntersection() argument
441 if (shape1.SameHandle(shape2)) { in OutputAsIntersection()
446 if (!ctx->RankKnown(shape2) && !ctx->RankKnown(shape1)) { in OutputAsIntersection()
449 } else if (!ctx->RankKnown(shape2) && ctx->RankKnown(shape1)) { in OutputAsIntersection()
451 } else if (ctx->RankKnown(shape2) && !ctx->RankKnown(shape1)) { in OutputAsIntersection()
452 return shape2; in OutputAsIntersection()
455 if (ctx->Rank(shape2) != rank) { in OutputAsIntersection()
463 if (!ctx->Dim(shape1, d).SameHandle(ctx->Dim(shape2, d))) { in OutputAsIntersection()
465 ctx->Value(ctx->Dim(shape2, d))) { in OutputAsIntersection()
468 new_dim = ctx->Dim(shape2, d); in OutputAsIntersection()
[all …]
/external/tensorflow/tensorflow/compiler/xla/
Dshape_util_test.cc152 Shape shape2 = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() local
153 ASSERT_TRUE(ShapeUtil::Compatible(shape1, shape2)); in TEST()
175 Shape shape2 = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() local
176 ASSERT_TRUE(ShapeUtil::CompatibleIgnoringFpPrecision(shape1, shape2)); in TEST()
181 Shape shape2 = ShapeUtil::MakeShape(F32, {2, 2}); in TEST() local
182 ASSERT_FALSE(ShapeUtil::CompatibleIgnoringFpPrecision(shape1, shape2)); in TEST()
245 Shape shape2 = ShapeUtil::MakeShape(F32, {20, 30}); in TEST() local
246 shape2.mutable_layout()->add_padded_dimensions(11); in TEST()
248 EXPECT_FALSE(ShapeUtil::Equal(shape1, shape2)); in TEST()
255 Shape shape2 = ShapeUtil::MakeShape(F32, {20, 30}); in TEST() local
[all …]
/external/gemmlowp/test/
Dbenchmark_all_sizes.cc212 bool operator<(const Shape& shape1, const Shape& shape2) { in operator <() argument
213 return shape1.depth < shape2.depth || in operator <()
214 (shape1.depth == shape2.depth && in operator <()
215 (shape1.rows < shape2.rows || in operator <()
216 (shape1.rows == shape2.rows && shape1.cols < shape2.cols))); in operator <()
/external/tensorflow/tensorflow/core/kernels/
Dset_kernels.cc383 Status CheckShapesMatch(VarDimArray shape1, VarDimArray shape2) { in CheckShapesMatch() argument
384 if (shape1 != shape2) { in CheckShapesMatch()
387 str_util::Join(shape2, ","), "]"); in CheckShapesMatch()
394 Status GroupShapeFromInputs(VarDimArray shape1, VarDimArray shape2, in GroupShapeFromInputs() argument
399 TF_RETURN_IF_ERROR(GroupShape(shape2, &group_shape_2)); in GroupShapeFromInputs()
438 const auto shape2 = TensorShapeToArray(set2_t.shape()); in ComputeDenseToDense() local
439 OP_REQUIRES_OK(ctx, GroupShapeFromInputs(shape1, shape2, &group_shape)); in ComputeDenseToDense()
442 const auto set2_strides = Strides(shape2); in ComputeDenseToDense()
Dsegment_reduction_ops_test.cc55 TensorShape shape2({num_rows}); in BM_SegmentReduction() local
56 Tensor input2(DataTypeToEnum<Index>::v(), shape2); in BM_SegmentReduction()
Dnn_ops_test.cc924 TensorShape shape2({4}); in BM_AvgPoolBk() local
925 Tensor input_shape_tensor(DT_INT32, shape2); in BM_AvgPoolBk()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dconstant_folding.cc387 const TensorShapeProto& shape2) { in ShapesEqual() argument
388 if (shape1.unknown_rank() || shape2.unknown_rank()) { in ShapesEqual()
391 if (shape1.dim_size() != shape2.dim_size()) { in ShapesEqual()
395 if (shape1.dim(i).size() != shape2.dim(i).size()) { in ShapesEqual()
398 if (shape1.dim(i).size() == -1 || shape2.dim(i).size() == -1) { in ShapesEqual()
458 BCast::Vec shape2; in MaterializeBroadcastGradientArgs() local
459 if (!ExtractShape(*shape_node2, properties, &shape2, &min_id)) { in MaterializeBroadcastGradientArgs()
470 for (auto& id : shape2) { in MaterializeBroadcastGradientArgs()
480 const int common_dims = std::min(shape1.size(), shape2.size()); in MaterializeBroadcastGradientArgs()
482 if (shape1[i] >= 0 && shape2[i] >= 0) { in MaterializeBroadcastGradientArgs()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/
Dreshape_mover_test.cc527 auto shape2 = ShapeUtil::MakeShape(F32, {8, 7, 1}); in TEST_F() local
535 HloInstruction::CreateParameter(2, shape2, "param2")); in TEST_F()
537 builder.AddInstruction(HloInstruction::CreateReshape(shape2, param0)); in TEST_F()
539 builder.AddInstruction(HloInstruction::CreateReshape(shape2, param1)); in TEST_F()
541 shape2, HloOpcode::kAdd, reshape0, reshape1)); in TEST_F()
/external/tensorflow/tensorflow/core/ops/
Dio_ops.cc94 ShapeHandle shape0, shape1, shape2; in __anon74e9e0a80302() local
97 TF_RETURN_IF_ERROR(c->WithRank(c->input(2), 1, &shape2)); in __anon74e9e0a80302()
98 TF_RETURN_IF_ERROR(c->Merge(shape1, shape2, &shape0)); in __anon74e9e0a80302()
/external/tensorflow/tensorflow/python/ops/distributions/
Dutil.py704 shape1, shape2, name="prefer_static_broadcast_shape"): argument
716 with ops.name_scope(name, values=[shape1, shape2]):
737 shape2_ = get_tensor_shape(shape2)
742 shape2_ = get_shape_tensor(shape2)
/external/tensorflow/tensorflow/compiler/jit/
Dencapsulate_subgraphs_pass_test.cc938 GraphDefBuilder shape2(GraphDefBuilder::kFailImmediately); in TEST() local
941 shape2.opts().WithName("outside_compilation_F1_O1_recv")); in TEST()
943 shape2.opts().WithName("E")); in TEST()
946 shape2.opts().WithName("outside_compilation_F1_O2_recv")); in TEST()
947 Node* h = Binary(ops::NodeOut(recv2, 0), e, shape2.opts().WithName("H")); in TEST()
949 shape2.opts().WithName("outside_compilation_F1_O2_send")); in TEST()
951 TF_EXPECT_OK(shape2.ToGraphDef(&shape2_graph)); in TEST()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dfusion_test.cc789 Shape shape2 = ShapeUtil::MakeShape(F32, {param2_dim0, param2_dim1}); in BM_ParallelFusion() local
790 auto param2 = builder.Parameter(2, shape2, "param2"); in BM_ParallelFusion()
/external/tensorflow/tensorflow/python/ops/
Dcontrol_flow_ops.py539 def _ShapeLessThanOrEqual(shape1, shape2): argument
540 if shape2.dims is None:
542 if shape1.ndims != shape2.ndims:
544 for dim1, dim2 in zip(shape1.dims, shape2.dims):