/external/tensorflow/tensorflow/compiler/xla/service/cpu/ |
D | cpu_layout_assignment.cc | 81 Shape new_shape(old_shape); in RowMajorShape() local 82 std::vector<int64> dimension_order(new_shape.dimensions_size()); in RowMajorShape() 84 *new_shape.mutable_layout() = LayoutUtil::MakeLayout(dimension_order); in RowMajorShape() 85 return new_shape; in RowMajorShape() 89 Shape new_shape(old_shape); in ColMajorShape() local 90 std::vector<int64> dimension_order(new_shape.dimensions_size()); in ColMajorShape() 92 *new_shape.mutable_layout() = LayoutUtil::MakeLayout(dimension_order); in ColMajorShape() 93 return new_shape; in ColMajorShape()
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
D | shape_op.cc | 135 std::vector<int64> new_shape(existing_dims_size); in Compile() local 136 for (size_t i = 0; i < new_shape.size(); ++i) { in Compile() 137 new_shape[i] = existing_dims[i]; in Compile() 148 new_shape.emplace(new_shape.begin() + dim, 1); in Compile() 150 ctx->SetOutput(0, ctx->builder()->Reshape(ctx->Input(0), new_shape)); in Compile() 167 std::vector<int64> new_shape; in Compile() local 198 new_shape.push_back(existing_dim); in Compile() 203 new_shape.push_back(existing_dim); in Compile() 208 ctx->SetOutput(0, ctx->builder()->Reshape(ctx->Input(0), new_shape)); in Compile()
|
D | dynamic_stitch_op.cc | 141 TensorShape new_shape; in Compile() local 143 new_shape.AddDim(indices[input_num].shape().dimensions(0)); in Compile() 146 new_shape.AddDim(data0_shape.dim_size(d)); in Compile() 150 if (new_shape == data_shapes[input_num]) { in Compile() 154 ctx->builder()->Reshape(handle, new_shape.dim_sizes()); in Compile()
|
/external/tensorflow/tensorflow/core/api_def/base_api/ |
D | api_def_SparseReshape.pbtxt | 17 name: "new_shape" 33 SparseTensor. This is the same as `new_shape` but with any -1 dimensions 40 tensor. The `input_indices` are recomputed based on the requested `new_shape`. 42 If one component of `new_shape` is the special value -1, the size of that 44 most one component of `new_shape` can be -1. The number of dense elements 45 implied by `new_shape` must be the same as the number of dense elements 50 If the input tensor has rank `R_in` and `N` non-empty values, and `new_shape`
|
/external/tensorflow/tensorflow/core/kernels/ |
D | shape_ops.h | 167 std::vector<int64> new_shape(existing_dims_size); in Compute() 168 for (size_t i = 0; i < new_shape.size(); ++i) { in Compute() 169 new_shape[i] = existing_dims[i]; in Compute() 180 new_shape.emplace(new_shape.begin() + dim, 1); in Compute() 181 const TensorShape output_shape(new_shape); in Compute() 212 std::vector<int64> new_shape; in Compute() local 244 new_shape.push_back(existing_dim); in Compute() 249 new_shape.push_back(existing_dim); in Compute() 254 const TensorShape output_shape(new_shape); in Compute()
|
/external/tensorflow/tensorflow/python/ops/ |
D | special_math_ops.py | 326 new_shape = ( 329 t0 = _reshape_if_necessary(t0, new_shape) 334 new_shape = ( 337 t1 = _reshape_if_necessary(t1, new_shape) 362 def _reshape_if_necessary(tensor, new_shape): argument 365 new_shape = tuple(-1 if x is None else x for x in new_shape) 367 if (len(new_shape) == len(cur_shape) and 368 all(d0 == d1 or d1 == -1 for d0, d1 in zip(cur_shape, new_shape))): 371 return array_ops.reshape(tensor, new_shape)
|
/external/tensorflow/tensorflow/contrib/distributions/python/ops/bijectors/ |
D | chain.py | 119 new_shape = input_shape 125 new_shape = func(new_shape) 126 return new_shape
|
D | reshape.py | 253 new_shape = event_shape_out 255 new_shape = array_ops.concat( 258 return array_ops.reshape(x, new_shape)
|
/external/tensorflow/tensorflow/compiler/tf2xla/ |
D | xla_op_kernel.cc | 82 TensorShape new_shape(new_dims); in ConstantInputReshaped() local 83 if (tensor.NumElements() != new_shape.num_elements()) { in ConstantInputReshaped() 88 new_shape.DebugString()); in ConstantInputReshaped() 95 if (!temp.CopyFrom(expression->constant_value(), new_shape)) { in ConstantInputReshaped() 104 if (new_shape.num_elements() == 0) { in ConstantInputReshaped() 105 Tensor temp(tensor.dtype(), new_shape); in ConstantInputReshaped() 110 if (new_shape != tensor.shape()) { in ConstantInputReshaped() 112 handle = builder()->Reshape(handle, new_shape.dim_sizes()); in ConstantInputReshaped() 117 std::vector<int64> layout_indices(new_shape.dims()); in ConstantInputReshaped()
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | sparse_ops_test.py | 341 new_shape = np.array([3, 6, 7], dtype=np.int64) 342 sp_output = sparse_ops.sparse_reset_shape(sp_input, new_shape) 348 new_shape = np.array([3, 6, 7], dtype=np.int64) 349 sp_output = sparse_ops.sparse_reset_shape(sp_input, new_shape) 361 new_shape = np.array([3, 6, 7], dtype=np.int64) 362 sp_output = sparse_ops.sparse_reset_shape(sp_input, new_shape) 374 new_shape = np.array([3, 6, 7], dtype=np.int64) 375 sp_output = sparse_ops.sparse_reset_shape(sp_input, new_shape) 411 new_shape = np.array([3, 7], dtype=np.int64) 414 sparse_ops.sparse_reset_shape(sp_input, new_shape) [all …]
|
D | sparse_reshape_op_test.py | 264 new_shape = array_ops.placeholder(dtypes.int64) 265 sp_output = sparse_ops.sparse_reshape(sp_input, new_shape) 280 new_shape = [np.prod(factors[new_map == d]) for d in range(new_rank)] 286 new_dense = np.reshape(orig_dense, new_shape) 293 sp_output = sparse_ops.sparse_reshape(sp_input, new_shape) 298 self.assertAllEqual(output_val.dense_shape, new_shape)
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | reshape_mover.cc | 196 const Shape new_shape = in UpdateOperand() local 204 HloInstruction::CreateReshape(new_shape, operand)); in UpdateOperand() 211 new_shape, operand, inverse_permutation)); in UpdateOperand() 218 operand->CloneWithNewOperands(new_shape, operand->operands())); in UpdateOperand()
|
D | hlo_element_type_converter.cc | 186 Shape new_shape = GetConvertedTupleShape(hlo->shape(), eliminate_type_, in Run() local 189 new_shape, new_operands, hlo->GetModule())); in Run()
|
/external/tensorflow/tensorflow/core/framework/ |
D | shape_inference.h | 247 ShapeHandle new_shape; in MergeInput() local 248 if (!Merge(inputs_[idx], shape, &new_shape).ok()) return false; in MergeInput() 249 inputs_[idx] = new_shape; in MergeInput() 279 ShapeHandle new_shape; in RelaxInput() local 280 Relax(inputs_[idx], shape, &new_shape); in RelaxInput() 281 if (inputs_[idx].SameHandle(new_shape)) { in RelaxInput() 284 inputs_[idx] = new_shape; in RelaxInput()
|
/external/tensorflow/tensorflow/contrib/lite/kernels/ |
D | reshape_test.cc | 29 std::initializer_list<int> new_shape) { in ReshapeOpModel() argument 34 CreateReshapeOptions(builder_, builder_.CreateVector<int>(new_shape)) in ReshapeOpModel()
|
/external/tensorflow/tensorflow/contrib/bayesflow/python/ops/ |
D | mcmc_diagnostics_impl.py | 190 new_shape = [-1] + [1] * (auto_corr.shape.ndims - 1) 192 new_shape = array_ops.concat( 196 nk_factor = array_ops.reshape(nk_factor, new_shape)
|
/external/tensorflow/tensorflow/contrib/distributions/python/ops/ |
D | shape.py | 390 new_shape = array_ops.concat([[-1], batch_shape, event_shape], 0) 391 x = array_ops.reshape(x, shape=new_shape) 448 new_shape = array_ops.concat([sample_shape, batch_shape, event_shape], 0) 449 x = array_ops.reshape(x, shape=new_shape)
|
/external/tensorflow/tensorflow/core/ops/ |
D | array_ops_test.cc | 825 Tensor new_shape = test::AsTensor<int32>({1, 2, 3}); in TEST() local 826 op.input_tensors[1] = &new_shape; in TEST() 836 new_shape = test::AsTensor<int32>({-1}); in TEST() 840 new_shape = test::AsTensor<int32>({2, -1}); in TEST() 847 new_shape = test::AsTensor<int32>({-1, -1, 2}); in TEST() 851 new_shape = test::AsTensor<int32>({}); in TEST() 858 new_shape = test::AsTensor<int32>({-1}); in TEST() 860 new_shape = test::AsTensor<int32>({-1, 6}); in TEST() 862 new_shape = test::AsTensor<int32>({0, -1}); in TEST() 876 Tensor new_shape = test::AsTensor<int32>({1, 2, 3}); in TEST() local [all …]
|
D | sparse_ops.cc | 358 ShapeHandle new_shape; in __anon4f27251e0f02() local 362 TF_RETURN_IF_ERROR(c->WithRank(c->input(2), 1, &new_shape)); in __anon4f27251e0f02() 364 c->set_output(0, c->Matrix(c->Dim(indices, 0), c->Dim(new_shape, 0))); in __anon4f27251e0f02() 365 c->set_output(1, new_shape); in __anon4f27251e0f02()
|
/external/tensorflow/tensorflow/contrib/quantize/python/ |
D | fold_batch_norms.py | 105 new_shape = [ 110 multiplier_tensor, new_shape, name='scale_reshape') 114 correction_scale, new_shape, name='correction_reshape') 585 new_shape = [ 592 scale = array_ops.reshape(scale.outputs[0], new_shape, 596 correction_scale = array_ops.reshape(correction_scale, new_shape,
|
/external/tensorflow/tensorflow/python/ops/distributions/ |
D | bernoulli.py | 117 new_shape = array_ops.concat([[n], self.batch_shape_tensor()], 0) 119 new_shape, seed=seed, dtype=self.probs.dtype)
|
/external/tensorflow/tensorflow/python/keras/_impl/keras/layers/ |
D | merge.py | 142 new_shape = K.concatenate([x_shape[1:], K.expand_dims(batch_size)]) 147 x_transposed = K.reshape(x_transposed, new_shape) 165 new_shape = K.concatenate( 169 y = K.reshape(y, new_shape)
|
/external/tensorflow/tensorflow/compiler/xla/ |
D | shape_util.cc | 811 Shape new_shape = original; in ChangeElementType() local 812 new_shape.set_element_type(type); in ChangeElementType() 813 return new_shape; in ChangeElementType() 973 Shape new_shape = shape; in PermuteDimensions() local 974 new_shape.clear_dimensions(); in PermuteDimensions() 976 new_shape.add_dimensions(dim); in PermuteDimensions() 980 Layout* new_layout = new_shape.mutable_layout(); in PermuteDimensions() 994 return new_shape; in PermuteDimensions()
|
/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/ |
D | ir_array.cc | 298 IrArray IrArray::CastToShape(const Shape& new_shape, in CastToShape() argument 301 llvm::Type* new_ir_type = llvm_ir::ShapeToIrType(new_shape, module); in CastToShape() 304 new_shape); in CastToShape()
|
/external/tensorflow/tensorflow/contrib/lite/ |
D | model.cc | 485 auto* new_shape = schema_params->new_shape(); in ParseOpData() local 486 FlatBufferIntVectorToArray(sizeof(params->shape), new_shape, in ParseOpData() 488 params->num_dimensions = new_shape->Length(); in ParseOpData()
|