/external/tensorflow/tensorflow/compiler/tf2xla/ |
D | xla_helpers.cc | 181 xla::XlaBuilder* builder, xla::XlaOp original, xla::Shape original_shape, in ReshapeWithCorrectRepresentationAndSharding() argument 184 if (original_shape.IsTuple()) { in ReshapeWithCorrectRepresentationAndSharding() 186 for (int64 i = 0; i < original_shape.tuple_shapes_size(); ++i) { in ReshapeWithCorrectRepresentationAndSharding() 191 original_shape.tuple_shapes(i), in ReshapeWithCorrectRepresentationAndSharding() 197 if (!original_shape.IsArray()) return original; in ReshapeWithCorrectRepresentationAndSharding() 199 TF_RETURN_IF_ERROR(XLAShapeToTensorShape(original_shape, &shape)); in ReshapeWithCorrectRepresentationAndSharding() 201 original_shape.element_type())); in ReshapeWithCorrectRepresentationAndSharding() 210 if (xla::ShapeUtil::Compatible(original_shape, to_shape)) { in ReshapeWithCorrectRepresentationAndSharding() 211 for (int64 i = 0; i < original_shape.rank(); ++i) { in ReshapeWithCorrectRepresentationAndSharding() 212 to_shape.set_dynamic_dimension(i, original_shape.is_dynamic_dimension(i)); in ReshapeWithCorrectRepresentationAndSharding()
|
D | xla_helpers.h | 94 xla::XlaBuilder* builder, xla::XlaOp original, xla::Shape original_shape,
|
D | xla_compiler.cc | 232 TF_ASSIGN_OR_RETURN(auto original_shape, builder->GetShape(value)); in BuildComputation() 235 builder, value, original_shape, in BuildComputation() 331 TF_ASSIGN_OR_RETURN(auto original_shape, builder->GetShape(handle)); in BuildComputation() 334 builder, handle, original_shape, in BuildComputation()
|
/external/tensorflow/tensorflow/lite/testing/op_tests/ |
D | nearest_upsample.py | 37 def new_shape_for_upsample(original_shape, scales, axis): argument 43 for i in range(len(original_shape)): 44 input_new_shape.append(original_shape[i]) 49 upsample_new_shape.append(original_shape[i] * scales[j]) 52 upsample_new_shape.append(original_shape[i])
|
/external/tensorflow/tensorflow/compiler/xla/tests/ |
D | replay_test.cc | 54 std::unique_ptr<ProgramShape> original_shape = in TEST_F() local 58 ASSERT_TRUE(protobuf_util::ProtobufEquals(original_shape->ToProto(), in TEST_F() 87 std::unique_ptr<ProgramShape> original_shape = in XLA_TEST_F() local 91 ASSERT_TRUE(protobuf_util::ProtobufEquals(original_shape->ToProto(), in XLA_TEST_F() 134 std::unique_ptr<ProgramShape> original_shape = in TEST_F() local 138 ASSERT_TRUE(protobuf_util::ProtobufEquals(original_shape->ToProto(), in TEST_F()
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
D | mirror_pad_op.cc | 32 const xla::Shape& original_shape, in DoMirrorPad() argument 43 for (int64 dimno = original_shape.rank() - 1; dimno >= 0; --dimno) { in DoMirrorPad() 47 int64 dim_size = original_shape.dimensions(dimno); in DoMirrorPad() 119 const xla::XlaOp t, const xla::Shape& original_shape, in DoMirrorPadGrad() argument 129 for (int64 dimno = original_shape.rank() - 1; dimno >= 0; --dimno) { in DoMirrorPadGrad() 132 int64 dim_size = original_shape.dimensions(dimno); in DoMirrorPadGrad()
|
/external/tensorflow/tensorflow/core/grappler/optimizers/data/vectorization/ |
D | reshape_vectorizer.cc | 34 Output GetVectorizedShape(Scope* s, Output tensor, Output original_shape) { in GetVectorizedShape() argument 44 return ops::Concat(*s, {dim_0, original_shape}, ops::Const(*s, 0)); in GetVectorizedShape()
|
/external/tensorflow/tensorflow/python/data/experimental/ops/ |
D | scan_ops.py | 107 for original_shape, weakened_shape in zip(flat_state_shapes, 109 if original_shape.ndims is not None and ( 111 original_shape.as_list() != weakened_shape.as_list()):
|
D | grouping.py | 359 for original_shape, weakened_shape in zip(flat_state_shapes, 361 if original_shape.ndims is not None and ( 363 original_shape.as_list() != weakened_shape.as_list()):
|
/external/tensorflow/tensorflow/compiler/xla/client/lib/ |
D | prng.cc | 221 const Shape& original_shape) { in CombineShapePair() argument 222 if (original_shape.rank() == 0) { in CombineShapePair() 227 const int64 pre_split_size = original_shape.dimensions(shape_pair.split_dim); in CombineShapePair() 228 std::vector<int64> reshape_dims(original_shape.dimensions().begin(), in CombineShapePair() 229 original_shape.dimensions().end()); in CombineShapePair() 234 result = Slice(result, std::vector<int64>(original_shape.rank(), 0), in CombineShapePair() 235 original_shape.dimensions(), in CombineShapePair() 236 std::vector<int64>(original_shape.rank(), 1)); in CombineShapePair()
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | bfloat16_normalization.cc | 173 auto original_shape = hlo->shape(); in ChangeOutputTypeThenInsertConvertBack() local 174 if (CountSubshapesWithMatchingType(original_shape, from) == 0) { in ChangeOutputTypeThenInsertConvertBack() 192 ShapeUtil::GetSubshape(original_shape, leaf_index); in ChangeOutputTypeThenInsertConvertBack() 349 auto original_shape = hlo->shape(); in HandleMultipleOutputs() local 379 *tuple->mutable_shape() = original_shape; in HandleMultipleOutputs()
|
D | hlo_rematerialization.cc | 1246 const Shape& original_shape = hlo->shape(); in GetCompactShape() local 1247 TF_ASSIGN_OR_RETURN(Shape min_shape, compact_shape_function_(original_shape)); in GetCompactShape() 1415 const Shape& original_shape = item->instruction->shape(); in PickRematerializationCandidates() local 1416 if (original_shape.IsArray()) { in PickRematerializationCandidates()
|
/external/tensorflow/tensorflow/python/ops/ |
D | embedding_ops.py | 880 original_shape = sparse_ids.dense_shape 884 array_ops.size(original_shape) 888 array_ops.slice(original_shape, [0], [original_rank - 1])), 889 array_ops.gather(original_shape, original_rank - 1) 932 math_ops.cast(original_shape, dtypes.int32), [0],
|
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/ |
D | image_preprocessing.py | 278 original_shape = inputs.shape.as_list() 279 batch_size, num_channels = original_shape[0], original_shape[3] 1195 original_shape = inputs.shape.as_list() 1196 output_shape = [original_shape[0]] + [None] + original_shape[2:4] 1292 original_shape = inputs.shape.as_list() 1293 output_shape = original_shape[0:2] + [None] + [original_shape[3]]
|
/external/tensorflow/tensorflow/python/ops/numpy_ops/ |
D | np_array_ops.py | 697 original_shape = a._shape_as_list() # pylint: disable=protected-access 699 known_shape = original_shape is not None and None not in original_shape 701 if not original_shape: 702 original_shape = (repeats,) 708 original_shape = (repeats_np * np.prod(original_shape),) 710 original_shape[axis] = repeats_np * original_shape[axis] 713 original_shape = (repeats_np.sum(),) 715 original_shape[axis] = repeats_np.sum() 720 result.set_shape(original_shape) 1273 original_shape = array_ops.shape(a) [all …]
|
/external/tensorflow/tensorflow/python/ops/ragged/ |
D | ragged_tensor_shape_test.py | 296 original_shape = RaggedTensorDynamicShape.from_dim_sizes(original_dim_sizes) 298 self.assertEqual(original_shape.rank, bcast_shape.rank) 300 bcast1 = original_shape.broadcast_dimension(axis, row_length)
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | sparse_reshape_op_test.py | 336 def _MakeAndReshapeTensor(self, tensor_class, original_shape, target_shape): argument 338 ind = np.zeros([0, len(original_shape)]).astype(np.int64) 340 shape = np.array(original_shape).astype(np.int64) 346 dense_input = array_ops.zeros(original_shape)
|
D | array_ops_test.py | 1036 original_shape = constant_op.constant([6, 4, 4], dtype=dtypes.int64) 1041 dx = array_ops.strided_slice_grad(original_shape, begin, end, strides, 1051 original_shape = constant_op.constant([6, 4, 4], dtype=dtypes.int64) 1059 dx = array_ops.strided_slice_grad(original_shape, begin, end, strides,
|
/external/tensorflow/tensorflow/python/keras/layers/ |
D | normalization.py | 746 original_shape = array_ops.shape(inputs) 747 original_shape = array_ops.concat( 748 [constant_op.constant([-1]), original_shape[1:]], axis=0) 751 original_shape[1:] 759 outputs = array_ops.reshape(outputs, original_shape)
|
/external/tensorflow/tensorflow/core/grappler/costs/ |
D | op_level_cost_estimator.h | 32 TensorShapeProto MaybeGetMinimumShape(const TensorShapeProto& original_shape,
|
D | op_level_cost_estimator.cc | 322 TensorShapeProto MaybeGetMinimumShape(const TensorShapeProto& original_shape, in MaybeGetMinimumShape() argument 324 auto shape = original_shape; in MaybeGetMinimumShape() 342 shape.add_dim()->set_size(original_shape.dim(i).size()); in MaybeGetMinimumShape()
|
/external/tensorflow/tensorflow/core/kernels/ |
D | strided_slice_op.cc | 350 TensorShape original_shape = old_lhs->shape(); in Compute() local
|
/external/tensorflow/tensorflow/python/keras/ |
D | backend.py | 3198 original_shape = int_shape(x) 3217 if original_shape[rows] is None: 3220 new_height = original_shape[rows] * height_factor 3222 if original_shape[cols] is None: 3225 new_width = original_shape[cols] * width_factor
|
/external/tensorflow/tensorflow/python/data/ops/ |
D | dataset_ops.py | 2188 for original_shape, weakened_shape in zip(flat_state_shapes, 2190 if original_shape.ndims is not None and ( 2192 original_shape.as_list() != weakened_shape.as_list()):
|
/external/tensorflow/tensorflow/compiler/xla/client/ |
D | xla_builder.cc | 1196 TF_ASSIGN_OR_RETURN(const Shape* original_shape, GetShapePtr(operand)); in Collapse() 1198 VLOG(3) << "original shape: " << ShapeUtil::HumanString(*original_shape); in Collapse() 1202 for (int i = 0; i < original_shape->rank(); ++i) { in Collapse() 1204 new_sizes.push_back(original_shape->dimensions(i)); in Collapse() 1206 new_sizes.back() *= original_shape->dimensions(i); in Collapse()
|