Home
last modified time | relevance | path

Searched refs:shape2 (Results 1 – 22 of 22) 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/layers/
Dmerge.py48 def _compute_elemwise_op_output_shape(self, shape1, shape2): argument
64 if None in [shape1, shape2]:
66 elif len(shape1) < len(shape2):
67 return self._compute_elemwise_op_output_shape(shape2, shape1)
68 elif not shape2:
70 output_shape = list(shape1[:-len(shape2)])
71 for i, j in zip(shape1[-len(shape2):], shape2):
82 'together with shapes ' + str(shape1) + ' ' + str(shape2))
490 shape2 = input_shape[1]
491 if shape1 is None or shape2 is None:
[all …]
/external/tensorflow/tensorflow/compiler/xla/
Dshape_util_test.cc87 Shape shape2 = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() local
88 ASSERT_TRUE(ShapeUtil::Compatible(shape1, shape2)); in TEST()
145 Shape shape2 = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() local
146 ASSERT_TRUE(ShapeUtil::CompatibleIgnoringFpPrecision(shape1, shape2)); in TEST()
151 Shape shape2 = ShapeUtil::MakeShape(F32, {2, 2}); in TEST() local
152 ASSERT_FALSE(ShapeUtil::CompatibleIgnoringFpPrecision(shape1, shape2)); in TEST()
253 Shape shape2 = ShapeUtil::MakeTupleShape( in TEST() local
255 EXPECT_FALSE(ShapeUtil::Compatible(shape1, shape2)); in TEST()
256 EXPECT_FALSE(ShapeUtil::Compatible(shape2, shape1)); in TEST()
257 EXPECT_FALSE(ShapeUtil::CompatibleIgnoringElementType(shape1, shape2)); in TEST()
[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/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.cc380 Status CheckShapesMatch(VarDimArray shape1, VarDimArray shape2) { in CheckShapesMatch() argument
381 if (shape1 != shape2) { in CheckShapesMatch()
384 str_util::Join(shape2, ","), "]"); in CheckShapesMatch()
391 Status GroupShapeFromInputs(VarDimArray shape1, VarDimArray shape2, in GroupShapeFromInputs() argument
396 TF_RETURN_IF_ERROR(GroupShape(shape2, &group_shape_2)); in GroupShapeFromInputs()
435 const auto shape2 = TensorShapeToArray(set2_t.shape()); in ComputeDenseToDense() local
436 OP_REQUIRES_OK(ctx, GroupShapeFromInputs(shape1, shape2, &group_shape)); in ComputeDenseToDense()
439 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/python/ops/
Dimage_ops_impl.py2724 shape2 = img2.get_shape().with_rank_at_least(3)
2725 shape1[-3:].assert_is_compatible_with(shape2[-3:])
2727 if shape1.ndims is not None and shape2.ndims is not None:
2729 reversed(shape2.dims[:-3])):
2732 'Two images are not compatible: %s and %s' % (shape1, shape2))
2735 shape1, shape2 = array_ops.shape_n([img1, img2])
2741 [shape1, shape2], summarize=10))
2743 math_ops.reduce_all(math_ops.equal(shape1[-3:], shape2[-3:])),
2744 [shape1, shape2], summarize=10))
2745 return shape1, shape2, checks
[all …]
Dcontrol_flow_ops.py454 def _ShapeLessThanOrEqual(shape1, shape2): argument
455 if shape2.dims is None:
457 if shape1.ndims != shape2.ndims:
459 for dim1, dim2 in zip(shape1.dims, shape2.dims):
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dshape_optimizer.cc111 const TensorShapeProto& shape2 = prop2[0].shape(); in Optimize() local
112 int64 result = ComputeSizeRatio(shape1, shape2); in Optimize()
Dconstant_folding.cc569 BCast::Vec shape2; in MaterializeBroadcastGradientArgs() local
570 if (!ExtractShape(*shape_node2, properties, &shape2, &min_id)) { in MaterializeBroadcastGradientArgs()
581 for (auto& id : shape2) { in MaterializeBroadcastGradientArgs()
591 const int common_dims = std::min(shape1.size(), shape2.size()); in MaterializeBroadcastGradientArgs()
593 if (shape1[i] >= 0 && shape2[i] >= 0) { in MaterializeBroadcastGradientArgs()
596 if (shape1[i] != shape2[i]) { in MaterializeBroadcastGradientArgs()
611 for (int i = common_dims; i < shape2.size(); ++i) { in MaterializeBroadcastGradientArgs()
612 if (shape2[i] < 0) { in MaterializeBroadcastGradientArgs()
617 BCast bcast(shape1, shape2); in MaterializeBroadcastGradientArgs()
/external/tensorflow/tensorflow/compiler/xla/service/
Dreshape_mover_test.cc494 auto shape2 = ShapeUtil::MakeShape(F32, {8, 7, 1}); in TEST_F() local
502 HloInstruction::CreateParameter(2, shape2, "param2")); in TEST_F()
504 builder.AddInstruction(HloInstruction::CreateReshape(shape2, param0)); in TEST_F()
506 builder.AddInstruction(HloInstruction::CreateReshape(shape2, param1)); in TEST_F()
508 shape2, HloOpcode::kAdd, reshape0, reshape1)); in TEST_F()
/external/tensorflow/tensorflow/core/ops/
Dio_ops.cc94 ShapeHandle shape0, shape1, shape2; in __anonec23b74b0302() local
97 TF_RETURN_IF_ERROR(c->WithRank(c->input(2), 1, &shape2)); in __anonec23b74b0302()
98 TF_RETURN_IF_ERROR(c->Merge(shape1, shape2, &shape0)); in __anonec23b74b0302()
/external/tensorflow/tensorflow/compiler/jit/
Dencapsulate_subgraphs_pass_test.cc1051 GraphDefBuilder shape2(GraphDefBuilder::kFailImmediately); in TEST() local
1052 Node* key_constant = KeyPlaceholder("F1", shape2.opts()); in TEST()
1055 shape2.opts().WithAttr(kXlaHasHostTransferAttrName, true)); in TEST()
1057 shape2.opts() in TEST()
1063 shape2.opts().WithAttr(kXlaHasHostTransferAttrName, true)); in TEST()
1065 shape2.opts() in TEST()
1070 shape2.opts() in TEST()
1075 shape2.opts().WithAttr(kXlaHasHostTransferAttrName, true)); in TEST()
1077 AddGraphDefToFunctionLibrary(shape2, "F1_O2", &library_expected)); in TEST()
1936 GraphDefBuilder shape2(GraphDefBuilder::kFailImmediately); in TEST() local
[all …]
/external/tensorflow/tensorflow/lite/kernels/internal/
Dtypes.h427 const RuntimeShape& shape2, int index2) { in MatchingDim() argument
428 TFLITE_DCHECK_EQ(shape1.Dims(index1), shape2.Dims(index2)); in MatchingDim()
434 const RuntimeShape& shape2, int index2, Args... args) { in MatchingDim() argument
435 TFLITE_DCHECK_EQ(shape1.Dims(index1), shape2.Dims(index2)); in MatchingDim()
/external/tensorflow/tensorflow/contrib/lite/kernels/internal/
Dtypes.h411 const RuntimeShape& shape2, int index2) { in MatchingDim() argument
412 TFLITE_DCHECK_EQ(shape1.Dims(index1), shape2.Dims(index2)); in MatchingDim()
418 const RuntimeShape& shape2, int index2, Args... args) { in MatchingDim() argument
419 TFLITE_DCHECK_EQ(shape1.Dims(index1), shape2.Dims(index2)); in MatchingDim()
/external/tensorflow/tensorflow/python/ops/distributions/
Dutil.py700 shape1, shape2, name="prefer_static_broadcast_shape"): argument
712 with ops.name_scope(name, values=[shape1, shape2]):
733 shape2_ = get_tensor_shape(shape2)
738 shape2_ = get_shape_tensor(shape2)
/external/tensorflow/tensorflow/core/grappler/costs/
Dgraph_properties.cc931 ShapeHandle shape1, ShapeHandle shape2) { in OutputAsUnion() argument
932 if (shape1.SameHandle(shape2)) { in OutputAsUnion()
938 if (!ctx->RankKnown(shape2) || ctx->Rank(shape2) != rank) { in OutputAsUnion()
942 if (!ctx->Dim(shape1, d).SameHandle(ctx->Dim(shape2, d))) { in OutputAsUnion()
944 int64 val2 = ctx->Value(ctx->Dim(shape2, d)); in OutputAsUnion()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dfusion_test.cc858 Shape shape2 = ShapeUtil::MakeShape(F32, {param2_dim0, param2_dim1}); in BM_ParallelFusion() local
859 auto param2 = Parameter(&builder, 2, shape2, "param2"); in BM_ParallelFusion()
/external/tensorflow/tensorflow/lite/testing/nnapi_tflite_zip_tests/
Dtest_manifest.txt898 fully_connected/fully_connected_constant_filter=True,shape1=[3,3],shape2=[3,3],transpose_a=False,tr…
899 fully_connected/fully_connected_constant_filter=False,shape1=[3,3],shape2=[3,3],transpose_a=False,t…
900 fully_connected/fully_connected_constant_filter=True,shape1=[3,3],shape2=[3,3],transpose_a=False,tr…
901 fully_connected/fully_connected_constant_filter=False,shape1=[3,3],shape2=[3,3],transpose_a=False,t…
902 fully_connected/fully_connected_constant_filter=True,shape1=[4,4],shape2=[4,4],transpose_a=False,tr…
903 fully_connected/fully_connected_constant_filter=True,shape1=[1,4],shape2=[4,4],transpose_a=False,tr…
904 fully_connected/fully_connected_constant_filter=False,shape1=[4,4],shape2=[4,4],transpose_a=False,t…
905 fully_connected/fully_connected_constant_filter=False,shape1=[1,4],shape2=[4,4],transpose_a=False,t…
906 fully_connected/fully_connected_constant_filter=True,shape1=[4,4],shape2=[4,1],transpose_a=False,tr…
907 fully_connected/fully_connected_constant_filter=True,shape1=[1,4],shape2=[4,1],transpose_a=False,tr…
[all …]
/external/v8/src/
Dobjects.cc17287 StringShape shape2(other); in IsMatch() local
17289 shape2.encoding_tag() == kOneByteStringTag) { in IsMatch()
17296 shape2.encoding_tag() == kTwoByteStringTag) { in IsMatch()