Home
last modified time | relevance | path

Searched refs:slice_shape (Results 1 – 18 of 18) sorted by relevance

/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dtensor_list_ops.cc227 auto slice_shape = shape.dim_sizes(); in Compile() local
228 slice_shape[0] = 1LL; in Compile()
230 xla::XlaOp read = xla::DynamicSlice(buffer, start_indices, slice_shape); in Compile()
232 std::vector<int64> value_shape(slice_shape.begin() + 1, slice_shape.end()); in Compile()
366 TensorShape slice_shape = elem_shape; in Compile() local
367 slice_shape.InsertDim(0, 1LL); in Compile()
368 auto update = xla::Reshape(value, slice_shape.dim_sizes()); in Compile()
409 TensorShape slice_shape = elem_shape; in Compile() local
410 slice_shape.InsertDim(0, 1LL); in Compile()
411 auto update = xla::Reshape(value, slice_shape.dim_sizes()); in Compile()
[all …]
Dstack_ops.cc152 TensorShape slice_shape = elem_shape; in Compile() local
153 slice_shape.InsertDim(0, 1LL); in Compile()
154 auto update = xla::Reshape(value, slice_shape.dim_sizes()); in Compile()
208 auto slice_shape = stack_shape.dim_sizes(); in Compile() local
209 slice_shape[0] = 1LL; in Compile()
213 xla::XlaOp read = xla::DynamicSlice(ta, start_indices, slice_shape); in Compile()
216 std::vector<int64> value_shape(slice_shape.begin() + 1, slice_shape.end()); in Compile()
Dtensor_array_ops.cc219 TensorShape slice_shape = elem_shape; in Compile() local
220 slice_shape.InsertDim(0, 1LL); in Compile()
221 auto update = xla::Reshape(value, slice_shape.dim_sizes()); in Compile()
225 written = DynamicAddSlice(b, ta, update, slice_shape.dim_sizes(), in Compile()
270 auto slice_shape = ta_shape.dim_sizes(); in Compile() local
271 slice_shape[0] = 1LL; in Compile()
273 xla::XlaOp read = xla::DynamicSlice(ta, start_indices, slice_shape); in Compile()
276 std::vector<int64> value_shape(slice_shape.begin() + 1, slice_shape.end()); in Compile()
/external/tensorflow/tensorflow/core/kernels/
Dsparse_conditional_accumulator.h270 Eigen::DSizes<Eigen::DenseIndex, 1> slice_shape(num_col); in AddToAccumGradFunction()
277 SliceT sum_slice(sum_slice_ptr, slice_shape); in AddToAccumGradFunction()
282 SliceT accum_slice(accum_slice_ptr, slice_shape); in AddToAccumGradFunction()
290 SliceConstT grad_slice(grad_slice_ptr, slice_shape); in AddToAccumGradFunction()
292 SliceT accum_slice(accum_slice_ptr, slice_shape); in AddToAccumGradFunction()
299 SliceConstT grad_slice(grad_slice_ptr, slice_shape); in AddToAccumGradFunction()
339 Eigen::DSizes<Eigen::DenseIndex, 1> slice_shape(accum_flat.dimension(1)); in DivideAccumGradByCounter()
342 SliceT accum_slice(accum_slice_ptr, slice_shape); in DivideAccumGradByCounter()
Dload_and_remap_matrix_op.cc205 TensorShape slice_shape; in Compute() local
207 tensor_slice.SliceTensorShape(tensor_shape, &slice_shape)); in Compute()
210 if (loaded_tensor_t.shape() != slice_shape) { in Compute()
211 loaded_tensor_t = Tensor(DT_FLOAT, slice_shape); in Compute()
Dsave_restore_v2_ops.cc120 TensorShape slice_shape; in Compute() local
123 shape_spec, &shape, &slice, &slice_shape)); in Compute()
124 OP_REQUIRES(context, slice_shape.IsSameSize(tensor.shape()), in Compute()
Dsave_restore_tensor.cc107 TensorShape slice_shape; in SaveTensors() local
109 shape_spec, &shape, &slice, &slice_shape)); in SaveTensors()
110 OP_REQUIRES(context, slice_shape.IsSameSize(input.shape()), in SaveTensors()
Dscatter_nd_op.cc726 auto slice_shape = indices.shape(); in DoScatterNd() local
727 slice_shape.RemoveLastDims(1); in DoScatterNd()
729 "indices", SliceDebugString(slice_shape, bad_i), " = [", in DoScatterNd()
/external/tensorflow/tensorflow/contrib/distributions/python/ops/
Dshape.py355 def slice_shape(start_sum, size, name): function
368 return (slice_shape([], sample_ndims,
370 slice_shape([sample_ndims], self.batch_ndims,
372 slice_shape([sample_ndims, self.batch_ndims], self.event_ndims,
/external/tensorflow/tensorflow/python/ops/signal/
Dshape_ops.py155 slice_shape = array_ops.concat([outer_dimensions,
163 slice_shape), subframe_shape)
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dcudnn_conv_padding_legalization.cc370 Shape slice_shape = in CanonicalizeBackwardInputConvolution() local
374 CHECK(ShapeUtil::Compatible(slice_shape, backward_conv_shape)) in CanonicalizeBackwardInputConvolution()
375 << ShapeUtil::HumanString(slice_shape) << " vs " in CanonicalizeBackwardInputConvolution()
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dcpu_instruction_fusion_test.cc387 Shape slice_shape = ShapeUtil::MakeShape(F32, {}); in TEST_F() local
392 HloInstruction::CreateParameter(1, slice_shape, "starts")); in TEST_F()
464 Shape slice_shape = ShapeUtil::MakeShape(F32, {2}); in TEST_F() local
468 HloInstruction::CreateSlice(slice_shape, param0, {0}, {4}, {2})); in TEST_F()
552 Shape slice_shape = ShapeUtil::MakeShape(F32, {10, 1, 1000}); in TEST_F() local
565 slice_shape, in TEST_F()
/external/tensorflow/tensorflow/python/kernel_tests/
Dsegment_reduction_ops_test.py58 slice_shape = x.shape[indices.ndim:]
59 x_flat = x.reshape((indices.size,) + slice_shape)
69 initial_value_slice = np.ones(slice_shape) * initial_value
73 output = [o.reshape(slice_shape) for o in output]
/external/tensorflow/tensorflow/compiler/xla/service/
Dhlo_creation_utils.cc75 TF_ASSIGN_OR_RETURN(Shape slice_shape, ShapeInference::InferSliceShape( in MakeSliceHlo()
79 slice_shape, operand, start_indices, limit_indices, strides)); in MakeSliceHlo()
Dalgebraic_simplifier_test.cc3515 Shape slice_shape = ShapeUtil::MakeShape(F32, {2, 2, 3, 3}); in TEST_F() local
3517 slice_shape, broadcast, {0, 1, 2, 3}, {2, 3, 5, 6}, {1, 1, 1, 1})); in TEST_F()
3524 EXPECT_TRUE(ShapeUtil::Equal(root->shape(), slice_shape)); in TEST_F()
3534 .WithShapeEqualTo(&slice_shape))); in TEST_F()
3841 Shape slice_shape = ShapeUtil::MakeShape(F32, {10, 1, 1000}); in TEST_F() local
3854 slice_shape, in TEST_F()
3861 slice_shape, in TEST_F()
3863 HloInstruction::CreateParameter(4, slice_shape, "to_update")), in TEST_F()
Dhlo_dataflow_analysis_test.cc2180 Shape slice_shape = ShapeUtil::MakeShape(F32, {1, 2}); in TEST_F() local
2187 slice_shape, param, {zero, zero}, {1, 2, 2})); in TEST_F()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dtest_utils.cc450 const Shape& slice_shape = use->opcode() == HloOpcode::kDynamicSlice in CreateLiteralForConstrainedUses() local
461 ShapeUtil::GetDimension(slice_shape, in CreateLiteralForConstrainedUses()
/external/python/cpython3/Lib/test/
Dtest_buffer.py349 def slice_shape(lst, slices): function
354 return [len(lst[slices[0]])] + slice_shape(lst[0], slices[1:])
386 lshape = slice_shape(llst, lslices)
387 rshape = slice_shape(rlst, rslices)