Home
last modified time | relevance | path

Searched refs:src_shape (Results 1 – 20 of 20) sorted by relevance

/external/tensorflow/tensorflow/core/util/
Dtensor_format.h591 const TensorShape& src_shape, in ShapeFromFormat() argument
594 return src_shape; in ShapeFromFormat()
597 const int64 batch = GetTensorDim(src_shape, src_format, 'N'); in ShapeFromFormat()
598 const int64 channels = GetTensorDim(src_shape, src_format, 'C') * in ShapeFromFormat()
601 GetTensorSpatialDims(src_shape.dims(), src_format); in ShapeFromFormat()
605 gtl::ArraySlice<int64>(src_shape.dim_sizes())[GetTensorSpatialDimIndex( in ShapeFromFormat()
606 src_shape.dims(), src_format, spatial_dim)]; in ShapeFromFormat()
617 const TensorShape& src_shape, in ShapeFromFilterFormat() argument
620 return src_shape; in ShapeFromFilterFormat()
623 const int64 output_channels = GetFilterDim(src_shape, src_filter_format, 'O'); in ShapeFromFilterFormat()
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/common/transformations/
Dglobal_pooling_to_reduce_op.cc34 bool IsGlobalPooling(const Pooling2DAttributes& attr, const BHWC& src_shape, in IsGlobalPooling() argument
36 return dst_shape.w == 1 && dst_shape.h == 1 && attr.kernel.w == src_shape.w && in IsGlobalPooling()
37 attr.kernel.h == src_shape.h && attr.padding.appended.w == 0 && in IsGlobalPooling()
43 const BHWC& src_shape, const BHWC& dst_shape) { in IsGlobalAveragePooling() argument
46 IsGlobalPooling(attr, src_shape, dst_shape); in IsGlobalAveragePooling()
/external/tensorflow/tensorflow/lite/delegates/gpu/cl/kernels/
Dcl_test.cc60 auto src_shape = src_cpu[i].shape; in ExecuteGPUOperation() local
61 if (src_shape.b != 1 && !op_def.IsBatchSupported()) { in ExecuteGPUOperation()
65 RETURN_IF_ERROR(CreateTensor(*creation_context.context, src_shape, in ExecuteGPUOperation()
108 auto src_shape = src_cpu[i].shape; in ExecuteGPUOperation() local
109 if (src_shape.b != 1 && !op_def.IsBatchSupported()) { in ExecuteGPUOperation()
113 RETURN_IF_ERROR(CreateTensor(*creation_context.context, src_shape, in ExecuteGPUOperation()
/external/tensorflow/tensorflow/lite/delegates/gpu/metal/kernels/
Dtest_util.cc71 auto src_shape = src_cpu[i].shape; in ExecuteGPUOperation() local
72 if (src_shape.b != 1 && !op_def.IsBatchSupported()) { in ExecuteGPUOperation()
76 RETURN_IF_ERROR(CreateTensor(device_.device(), src_shape, in ExecuteGPUOperation()
Dconv_test.mm242 auto src_shape = BHWC(1, 17, 13, src_channels);
243 auto dst_shape = CalculateOutputShape(src_shape, attr);
244 int new_width = src_shape.w + attr.padding.prepended.w + attr.padding.appended.w - 2;
245 int new_height = src_shape.h + attr.padding.prepended.h + attr.padding.appended.h - 2;
253 src_tensor.shape = src_shape;
289 output1_shape.c = src_shape.c;
/external/tensorflow/tensorflow/lite/delegates/gpu/common/tasks/
Dreduce.h58 Reduce CreateReduce(const std::set<Axis>& axis_to_reduce, const BHWC& src_shape,
63 const BHWDC& src_shape, OperationType op_type,
Dconv_weights_converter_test_util.cc35 auto src_shape = in ConvolutionWeightsConverterTest() local
37 src_tensor.shape = src_shape; in ConvolutionWeightsConverterTest()
38 src_tensor.data.resize(src_shape.DimensionsProduct(), 2.0); in ConvolutionWeightsConverterTest()
44 const int s_index = src_shape.LinearIndex({o, y, x, i}); in ConvolutionWeightsConverterTest()
Dreduce.cc475 Reduce CreateReduce(const std::set<Axis>& axis_to_reduce, const BHWC& src_shape, in CreateReduce() argument
478 return Reduce(GetSizesFromShape(axis_to_reduce, src_shape), op_type, in CreateReduce()
483 const BHWDC& src_shape, OperationType op_type, in CreateReduce() argument
485 return Reduce(GetSizesFromShape(axis_to_reduce, src_shape), op_type, in CreateReduce()
/external/tensorflow/tensorflow/core/common_runtime/
Dshape_refiner.cc441 ShapeHandle src_shape = src_context->output(input_edge->src_output()); in ConstantPartialShape() local
443 if (src_context->Value(src_context->Rank(src_shape)) == 0) { in ConstantPartialShape()
468 TF_RETURN_IF_ERROR(src_context->WithRank(src_shape, 1, &src_shape)); in ConstantPartialShape()
471 if (src_context->Value(src_context->Dim(src_shape, 0)) == 0) { in ConstantPartialShape()
484 target_context->MakeShapeFromTensor(&t, src_shape, result).ok()) { in ConstantPartialShape()
495 target_context->MakeShapeFromTensor(nullptr, src_shape, result)); in ConstantPartialShape()
569 evaluated ? &t : nullptr, src_shape, result)); in ConstantPartialShape()
/external/tensorflow/tensorflow/lite/delegates/gpu/metal/
Dinference_context.cc99 const auto src_shape = inputs[i]->tensor.shape; in IsGenericAdd() local
100 if (dst_shape.b != src_shape.b && src_shape.b == 1) { in IsGenericAdd()
103 if (dst_shape.h != src_shape.h && src_shape.h == 1) { in IsGenericAdd()
106 if (dst_shape.w != src_shape.w && src_shape.w == 1) { in IsGenericAdd()
109 if (dst_shape.c != src_shape.c && src_shape.c == 1) { in IsGenericAdd()
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_tensor_shape.py538 src_shape = RaggedTensorDynamicShape.from_tensor(rt_input)
539 src_shape = src_shape.broadcast_to_rank(dst_shape.rank)
573 if not src_shape.is_ragged(axis) and not dst_shape.is_ragged(axis):
574 src_size = src_shape.dimension_size(axis)
595 if not src_shape.is_ragged(axis) and dst_shape.is_ragged(axis):
/external/tensorflow/tensorflow/lite/delegates/gpu/cl/
Dinference_context.cc119 const auto src_shape = inputs[i]->tensor.shape; in IsGenericAdd() local
120 if (dst_shape.b != src_shape.b && src_shape.b == 1) { in IsGenericAdd()
123 if (dst_shape.h != src_shape.h && src_shape.h == 1) { in IsGenericAdd()
126 if (dst_shape.w != src_shape.w && src_shape.w == 1) { in IsGenericAdd()
129 if (dst_shape.c != src_shape.c && src_shape.c == 1) { in IsGenericAdd()
/external/tensorflow/tensorflow/lite/delegates/gpu/common/selectors/
Dsimple_selectors.cc162 const BHWC& src_shape, in SelectReduce() argument
167 CreateReduce(axis_to_reduce, src_shape, op_type, op_def, gpu_info)); in SelectReduce()
Dsimple_selectors.h73 const BHWC& src_shape,
/external/tensorflow/tensorflow/core/kernels/
Dragged_tensor_to_tensor_op.cc466 const auto& src_shape = default_value_tensor.shape(); in SetOutput() local
467 BCast bcast(BCast::FromShape(src_shape), BCast::FromShape(element_shape), in SetOutput()
479 src_shape, bcast); in SetOutput()
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/
Dlegalize_to_linalg.cc734 ArrayRef<int64_t> src_shape = in matchAndRewrite() local
750 while (curr_src_dim < src_shape.size() && curr_dst_dim < dst_shape.size()) { in matchAndRewrite()
752 int64_t src_size = src_shape[curr_src_dim]; in matchAndRewrite()
753 while (src_size < dst_size && curr_src_dim < src_shape.size()) { in matchAndRewrite()
756 src_size *= src_shape[curr_src_dim]; in matchAndRewrite()
765 while (curr_src_dim < src_shape.size() && in matchAndRewrite()
766 src_shape[curr_src_dim] == 1) { in matchAndRewrite()
777 if (curr_src_dim != src_shape.size() || curr_dst_dim != dst_shape.size()) in matchAndRewrite()
790 int64_t total_elems = std::accumulate(src_shape.begin(), src_shape.end(), in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/xla/
Dliteral.cc439 const Shape& src_shape) { in CopyElementsBetween() argument
440 CHECK(ShapeUtil::Compatible(dest_shape, src_shape)); in CopyElementsBetween()
447 src[IndexUtil::MultidimensionalIndexToLinearIndex(src_shape, index)]; in CopyElementsBetween()
1569 auto src_shape = src.subshape(); in CopyElementsWithDynamicBound() local
1572 CHECK(dest_shape.is_static() || src_shape.is_static()); in CopyElementsWithDynamicBound()
1573 auto bound_shape = dest_shape.is_static() ? src_shape : dest_shape; in CopyElementsWithDynamicBound()
1592 src_shape, index)]; in CopyElementsWithDynamicBound()
2377 const auto& src_shape = shape_->tuple_shapes(i); in MutableBorrowingLiteral() local
2378 CHECK(src_shape.IsArray()); in MutableBorrowingLiteral()
2379 child_piece.set_subshape(&src_shape); in MutableBorrowingLiteral()
[all …]
/external/tensorflow/tensorflow/lite/toco/
Dmodel.h2313 void copy_shape(const Shape& src_shape) { *mutable_shape() = src_shape; }
/external/tensorflow/tensorflow/compiler/xla/service/
Dhlo_verifier.cc994 const Shape& src_shape = ShapeUtil::GetTupleElementShape(operand_shape, 1); in HandleCopyDone() local
995 if (!ShapesSame(dest_shape, src_shape, in HandleCopyDone()
1001 StringifyShape(dest_shape), StringifyShape(src_shape), in HandleCopyDone()
Dalgebraic_simplifier.cc239 const Shape& src_shape = operand_convert->operand(0)->shape(); in IsConvertPairNoOp() local
243 const PrimitiveType src_type = src_shape.element_type(); in IsConvertPairNoOp()
260 ShapeUtil::ElementIsFloating(src_shape) && in IsConvertPairNoOp()
263 ShapeUtil::ElementIsIntegral(src_shape) && in IsConvertPairNoOp()