Home
last modified time | relevance | path

Searched refs:Dims (Results 1 – 25 of 162) sorted by relevance

1234567

/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dlegacy_reference_ops.h37 inline void ShapeFromDims(const tflite::Dims<4>& dims, RuntimeShape* shape) { in ShapeFromDims()
42 inline void DepthwiseConv(const float* input_data, const Dims<4>& input_dims, in DepthwiseConv()
43 const float* filter_data, const Dims<4>& filter_dims, in DepthwiseConv()
44 const float* bias_data, const Dims<4>& bias_dims, in DepthwiseConv()
50 const Dims<4>& output_dims) { in DepthwiseConv()
69 inline void DepthwiseConv(const float* input_data, const Dims<4>& input_dims, in DepthwiseConv()
70 const float* filter_data, const Dims<4>& filter_dims, in DepthwiseConv()
71 const float* bias_data, const Dims<4>& bias_dims, in DepthwiseConv()
76 const Dims<4>& output_dims) { in DepthwiseConv()
85 void DepthwiseConv(const float* input_data, const Dims<4>& input_dims, in DepthwiseConv()
[all …]
Dprocess_broadcast_shapes.h57 if (extended_shape0.Dims(i) == extended_shape1.Dims(i)) { in ProcessBroadcastShapes()
59 } else if (extended_shape0.Dims(i) == 1) { in ProcessBroadcastShapes()
63 } else if (extended_shape1.Dims(i) == 1) { in ProcessBroadcastShapes()
103 while (i >= 0 && shape_a->Dims(i) == shape_b->Dims(i)) { in ProcessBroadcastShapes()
104 params->broadcast_shape[4] *= shape_b->Dims(i); in ProcessBroadcastShapes()
109 while (i >= 0 && shape_a->Dims(i) == 1) { in ProcessBroadcastShapes()
110 params->broadcast_shape[3] *= shape_b->Dims(i); in ProcessBroadcastShapes()
113 while (i >= 0 && shape_a->Dims(i) == shape_b->Dims(i)) { in ProcessBroadcastShapes()
114 params->broadcast_shape[2] *= shape_a->Dims(i); in ProcessBroadcastShapes()
118 while (i >= 0 && shape_b->Dims(i) == 1) { in ProcessBroadcastShapes()
[all …]
Dbatch_matmul.h41 if (shape.Dims(x) == 1) { in extent()
46 prod *= shape.Dims(i); in extent()
62 extended_lhs_shape.Dims(0), extended_rhs_shape.Dims(0)); in BatchMatMul()
64 extended_lhs_shape.Dims(1), extended_rhs_shape.Dims(1)); in BatchMatMul()
66 extended_lhs_shape.Dims(2), extended_rhs_shape.Dims(2)); in BatchMatMul()
76 const int lhs_rows = extended_lhs_shape.Dims(3); in BatchMatMul()
77 const int rhs_cols = extended_rhs_shape.Dims(4); in BatchMatMul()
78 const int accum_depth = extended_lhs_shape.Dims(4); in BatchMatMul()
120 extended_lhs_shape.Dims(0), extended_rhs_shape.Dims(0)); in BatchMatMul()
122 extended_lhs_shape.Dims(1), extended_rhs_shape.Dims(1)); in BatchMatMul()
[all …]
Dbatch_to_space_nd.h32 new_shape.SetDim(0, shape.Dims(0)); in ExtendShapeBatchToSpace()
33 new_shape.SetDim(1, shape.Dims(1)); in ExtendShapeBatchToSpace()
34 new_shape.SetDim(3, shape.Dims(2)); in ExtendShapeBatchToSpace()
58 const int output_width = output_shape.Dims(2); in BatchToSpaceND()
59 const int output_height = output_shape.Dims(1); in BatchToSpaceND()
60 const int output_batch_size = output_shape.Dims(0); in BatchToSpaceND()
62 const int depth = input1_shape.Dims(3); in BatchToSpaceND()
63 const int input_width = input1_shape.Dims(2); in BatchToSpaceND()
64 const int input_height = input1_shape.Dims(1); in BatchToSpaceND()
65 const int input_batch_size = input1_shape.Dims(0); in BatchToSpaceND()
Dspace_to_batch_nd.h33 new_shape.SetDim(0, shape.Dims(0)); in ExtendShapeSpaceToBatch()
34 new_shape.SetDim(1, shape.Dims(1)); in ExtendShapeSpaceToBatch()
35 new_shape.SetDim(3, shape.Dims(2)); in ExtendShapeSpaceToBatch()
61 const int depth = input1_shape.Dims(3); in SpaceToBatchND()
62 const int input_width = input1_shape.Dims(2); in SpaceToBatchND()
63 const int input_height = input1_shape.Dims(1); in SpaceToBatchND()
64 const int input_batch_size = input1_shape.Dims(0); in SpaceToBatchND()
66 const int output_width = output_shape.Dims(2); in SpaceToBatchND()
67 const int output_height = output_shape.Dims(1); in SpaceToBatchND()
68 const int output_batch_size = output_shape.Dims(0); in SpaceToBatchND()
Dstrided_slice.h65 for (int offset_0 = start_0 * input_shape.Dims(1), in StridedSlice()
66 end_0 = stop_0 * input_shape.Dims(1), in StridedSlice()
67 step_0 = params_copy.strides[0] * input_shape.Dims(1); in StridedSlice()
70 for (int offset_1 = (offset_0 + start_1) * input_shape.Dims(2), in StridedSlice()
71 end_1 = (offset_0 + stop_1) * input_shape.Dims(2), in StridedSlice()
72 step_1 = params_copy.strides[1] * input_shape.Dims(2); in StridedSlice()
75 for (int offset_2 = (offset_1 + start_2) * input_shape.Dims(3), in StridedSlice()
76 end_2 = (offset_1 + stop_2) * input_shape.Dims(3), in StridedSlice()
77 step_2 = params_copy.strides[2] * input_shape.Dims(3); in StridedSlice()
80 for (int offset_3 = (offset_2 + start_3) * input_shape.Dims(4), in StridedSlice()
[all …]
Dpooling.h34 const int input_height = input_shape.Dims(1); in AveragePool()
35 const int input_width = input_shape.Dims(2); in AveragePool()
36 const int output_height = output_shape.Dims(1); in AveragePool()
37 const int output_width = output_shape.Dims(2); in AveragePool()
90 const int input_height = input_shape.Dims(1); in AveragePool()
91 const int input_width = input_shape.Dims(2); in AveragePool()
92 const int output_height = output_shape.Dims(1); in AveragePool()
93 const int output_width = output_shape.Dims(2); in AveragePool()
143 const int input_height = input_shape.Dims(1); in L2Pool()
144 const int input_width = input_shape.Dims(2); in L2Pool()
[all …]
Dspace_to_depth.h36 const int input_depth = input_shape.Dims(3); in SpaceToDepth()
37 const int input_width = input_shape.Dims(2); in SpaceToDepth()
38 const int input_height = input_shape.Dims(1); in SpaceToDepth()
39 const int input_batch = input_shape.Dims(0); in SpaceToDepth()
41 const int output_depth = output_shape.Dims(3); in SpaceToDepth()
42 const int output_width = output_shape.Dims(2); in SpaceToDepth()
43 const int output_height = output_shape.Dims(1); in SpaceToDepth()
44 const int output_batch = output_shape.Dims(0); in SpaceToDepth()
Ddepth_to_space.h36 const int input_depth = input_shape.Dims(3); in DepthToSpace()
37 const int input_width = input_shape.Dims(2); in DepthToSpace()
38 const int input_height = input_shape.Dims(1); in DepthToSpace()
39 const int input_batch = input_shape.Dims(0); in DepthToSpace()
41 const int output_depth = output_shape.Dims(3); in DepthToSpace()
42 const int output_width = output_shape.Dims(2); in DepthToSpace()
43 const int output_height = output_shape.Dims(1); in DepthToSpace()
44 const int output_batch = output_shape.Dims(0); in DepthToSpace()
Dconv.h51 const int input_height = input_shape.Dims(1); in Conv()
52 const int input_width = input_shape.Dims(2); in Conv()
53 const int filter_height = filter_shape.Dims(1); in Conv()
54 const int filter_width = filter_shape.Dims(2); in Conv()
55 const int output_height = output_shape.Dims(1); in Conv()
56 const int output_width = output_shape.Dims(2); in Conv()
134 const int input_height = input_shape.Dims(1); in Conv()
135 const int input_width = input_shape.Dims(2); in Conv()
136 const int filter_height = filter_shape.Dims(1); in Conv()
137 const int filter_width = filter_shape.Dims(2); in Conv()
[all …]
Dconv3d.h41 const int input_width = input_shape.Dims(3); in Conv3D()
42 const int input_height = input_shape.Dims(2); in Conv3D()
43 const int input_depth = input_shape.Dims(1); in Conv3D()
44 const int filter_width = filter_shape.Dims(2); in Conv3D()
45 const int filter_height = filter_shape.Dims(1); in Conv3D()
46 const int filter_depth = filter_shape.Dims(0); in Conv3D()
47 const int output_width = output_shape.Dims(3); in Conv3D()
48 const int output_height = output_shape.Dims(2); in Conv3D()
49 const int output_depth = output_shape.Dims(1); in Conv3D()
Dconcatenation.h46 concat_size += input_shapes[i]->Dims(axis); in Concatenation()
48 TFLITE_DCHECK_EQ(concat_size, output_shape.Dims(axis)); in Concatenation()
51 outer_size *= output_shape.Dims(i); in Concatenation()
57 base_inner_size *= output_shape.Dims(i); in Concatenation()
63 const int copy_size = input_shapes[i]->Dims(axis) * base_inner_size; in Concatenation()
97 concat_size += input_shapes[i]->Dims(axis); in ConcatenationWithScaling()
99 TFLITE_DCHECK_EQ(concat_size, output_shape.Dims(axis)); in ConcatenationWithScaling()
102 outer_size *= output_shape.Dims(i); in ConcatenationWithScaling()
108 base_inner_size *= output_shape.Dims(i); in ConcatenationWithScaling()
115 const int copy_size = input_shapes[i]->Dims(axis) * base_inner_size; in ConcatenationWithScaling()
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/
Dbatch_matmul.h51 if (shape.Dims(x) == 1) { in BatchMatMul()
56 prod *= shape.Dims(i); in BatchMatMul()
62 broadcast_dim(extended_lhs_shape.Dims(0), extended_rhs_shape.Dims(0)); in BatchMatMul()
64 broadcast_dim(extended_lhs_shape.Dims(1), extended_rhs_shape.Dims(1)); in BatchMatMul()
66 broadcast_dim(extended_lhs_shape.Dims(2), extended_rhs_shape.Dims(2)); in BatchMatMul()
76 const int lhs_rows = extended_lhs_shape.Dims(3); in BatchMatMul()
77 const int rhs_cols = extended_rhs_shape.Dims(4); in BatchMatMul()
78 const int accum_depth = extended_lhs_shape.Dims(4); in BatchMatMul()
142 if (shape.Dims(x) == 1) { in BatchMatMul()
147 prod *= shape.Dims(i); in BatchMatMul()
[all …]
Dlegacy_optimized_ops.h79 VectorMap<Scalar> MapAsVector(Scalar* data, const Dims<N>& dims) { in MapAsVector()
86 const Dims<N>& dims) { in MapAsMatrixWithFirstDimAsRows()
97 const Dims<N>& dims) { in MapAsMatrixWithLastDimAsCols()
108 const Dims<N>& dims) { in MapAsArrayWithFirstDimAsRows()
121 const Dims<N>& dims, in MapAsMatrixWithGivenNumberOfRows()
129 inline bool AreSameDims(const Dims<4>& dims1, const Dims<4>& dims2) { in AreSameDims()
138 inline void DepthwiseConv(const float* input_data, const Dims<4>& input_dims, in DepthwiseConv()
139 const float* filter_data, const Dims<4>& filter_dims, in DepthwiseConv()
140 const float* bias_data, const Dims<4>& bias_dims, in DepthwiseConv()
146 const Dims<4>& output_dims) { in DepthwiseConv()
[all …]
Dim2col_utils.h139 const int input_height = input_shape.Dims(1); in DilatedIm2col()
140 const int input_width = input_shape.Dims(2); in DilatedIm2col()
142 const int filter_height = filter_shape.Dims(1); in DilatedIm2col()
143 const int filter_width = filter_shape.Dims(2); in DilatedIm2col()
144 const int output_height = output_shape.Dims(1); in DilatedIm2col()
145 const int output_width = output_shape.Dims(2); in DilatedIm2col()
225 const int input_depth = input_shape.Dims(3); in Im2col()
226 const int input_width = input_shape.Dims(2); in Im2col()
227 const int input_height = input_shape.Dims(1); in Im2col()
228 const int output_depth = output_shape.Dims(3); in Im2col()
[all …]
/external/tensorflow/tensorflow/lite/kernels/internal/
Dtypes.h143 struct Dims { struct
213 inline int32_t Dims(int i) const { in Dims() function
326 inline tflite::Dims<4> ToRuntimeDims(const tflite::RuntimeShape& array_shape) { in ToRuntimeDims()
327 tflite::Dims<4> result; in ToRuntimeDims()
333 (i < dimensions_count) ? array_shape.Dims(dimensions_count - 1 - i) : 1; in ToRuntimeDims()
342 inline RuntimeShape DimsToShape(const tflite::Dims<4>& dims) { in DimsToShape()
427 inline int Offset(const Dims<4>& dims, int i0, int i1, int i2, int i3) { in Offset()
436 inline int Offset(const Dims<4>& dims, int* index) { in Offset()
449 int ArraySize(const Dims<N>& array, int index) { in ArraySize()
472 TFLITE_DCHECK_EQ(shape1.Dims(index1), shape2.Dims(index2)); in MatchingDim()
[all …]
Dtranspose_utils.cc26 *dim0 = input_shape.Dims(0); in IsTranspose2DApplicable()
27 *dim1 = input_shape.Dims(1); in IsTranspose2DApplicable()
45 *dim0 *= input_shape.Dims(i); in IsTranspose2DApplicable()
47 *dim1 *= input_shape.Dims(i); in IsTranspose2DApplicable()
61 if (input_shape->Dims(i) == 1) { in RemoveOneSizeDimensions()
84 if (input_shape->Dims(i) == 1) { in RemoveOneSizeDimensions()
87 input_shape->SetDim(new_dims_cnt, input_shape->Dims(i)); in RemoveOneSizeDimensions()
96 if (output_shape->Dims(i) == 1) { in RemoveOneSizeDimensions()
100 output_shape->SetDim(new_dims_cnt, output_shape->Dims(i)); in RemoveOneSizeDimensions()
130 flat_size /= input_shape.Dims(i); in Flatten()
[all …]
/external/tensorflow/tensorflow/lite/micro/kernels/ceva/
Dtypes.h311 struct Dims {
376 inline int32_t Dims(int i) const {
489 inline tflite::Dims<4> ToRuntimeDims(const tflite::RuntimeShape& array_shape) {
490 tflite::Dims<4> result;
496 (i < dimensions_count) ? array_shape.Dims(dimensions_count - 1 - i) : 1;
505 inline RuntimeShape DimsToShape(const tflite::Dims<4>& dims) {
576 inline int Offset(const Dims<4>& dims, int i0, int i1, int i2, int i3) {
585 inline int Offset(const Dims<4>& dims, int* index) {
598 int ArraySize(const Dims<N>& array, int index) {
621 TFLITE_DCHECK_EQ(shape1.Dims(index1), shape2.Dims(index2));
[all …]
/external/tensorflow/tensorflow/core/kernels/image/
Dmirror_pad_op.h95 static constexpr int Dims = internal::array_size<PaddingDimensions>::value;
96 typedef DSizes<Index, Dims> Dimensions;
120 EIGEN_STATIC_ASSERT(Dims > 0, YOU_MADE_A_PROGRAMMING_MISTAKE)
131 for (int dim = 0; dim < Dims; ++dim) {
141 for (int i = 0; i < Dims - 1; ++i) {
146 input_strides_[numext::maxi(0, Dims - 1)] = 1;
147 output_strides_[numext::maxi(0, Dims - 1)] = 1;
148 for (int i = Dims - 1; i > 0; --i) {
174 coeff(array<Index, Dims> coords) const {
175 for (int dim = 0; dim < Dims; ++dim) {
[all …]
/external/tensorflow/tensorflow/lite/kernels/internal/reference/integer_ops/
Ddepthwise_conv.h51 const int input_height = input_shape.Dims(1); in DepthwiseConvPerChannel()
52 const int input_width = input_shape.Dims(2); in DepthwiseConvPerChannel()
53 const int input_depth = input_shape.Dims(3); in DepthwiseConvPerChannel()
54 const int filter_height = filter_shape.Dims(1); in DepthwiseConvPerChannel()
55 const int filter_width = filter_shape.Dims(2); in DepthwiseConvPerChannel()
56 const int output_height = output_shape.Dims(1); in DepthwiseConvPerChannel()
57 const int output_width = output_shape.Dims(2); in DepthwiseConvPerChannel()
148 const int input_height = input_shape.Dims(1); in DepthwiseConvPerChannel()
149 const int input_width = input_shape.Dims(2); in DepthwiseConvPerChannel()
150 const int input_depth = input_shape.Dims(3); in DepthwiseConvPerChannel()
[all …]
/external/llvm-project/mlir/include/mlir/ExecutionEngine/
DRunnerUtils.h73 template <typename T, int M, int... Dims>
74 std::ostream &operator<<(std::ostream &os, const Vector<T, M, Dims...> &v);
76 template <int... Dims> struct StaticSizeMult {
80 template <int N, int... Dims> struct StaticSizeMult<N, Dims...> {
81 static constexpr int value = N * StaticSizeMult<Dims...>::value;
90 template <typename T, int M, int... Dims> struct VectorDataPrinter {
91 static void print(std::ostream &os, const Vector<T, M, Dims...> &val);
94 template <typename T, int M, int... Dims>
95 void VectorDataPrinter<T, M, Dims...>::print(std::ostream &os,
96 const Vector<T, M, Dims...> &val) {
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dreverse_sequence_op.h28 template <typename T, typename Tlen, size_t Dims>
32 ReverseGenerator(typename TTypes<T, Dims>::ConstTensor input, int32 batch_dim, in ReverseGenerator()
40 operator()(const Eigen::array<Eigen::DenseIndex, Dims>& coords) const { in operator()
41 Eigen::array<Eigen::DenseIndex, Dims> new_coords = coords; in operator()
51 typename TTypes<T, Dims>::ConstTensor input_;
61 template <typename Device, typename T, typename Tlen, size_t Dims>
64 const Device& d, typename TTypes<T, Dims>::ConstTensor input, in Compute()
67 typename TTypes<T, Dims>::Tensor output) { in Compute()
68 generator::ReverseGenerator<T, Tlen, Dims> generator(input, batch_dim, in Compute()
Dargmax_op.h30 #define DECLARE_COMPUTE_SPEC(Dims) \ argument
31 EIGEN_ALWAYS_INLINE static void Reduce##Dims( \
32 const Device& d, typename TTypes<T, Dims>::ConstTensor input, \
33 const int32 dimension, typename TTypes<Tout, Dims - 1>::Tensor output) { \
50 #define DECLARE_COMPUTE_SPEC(Dims) \ argument
51 EIGEN_ALWAYS_INLINE static void Reduce##Dims( \
52 const Device& d, typename TTypes<T, Dims>::ConstTensor input, \
53 const int32 dimension, typename TTypes<Tout, Dims - 1>::Tensor output) { \
/external/eigen/unsupported/Eigen/CXX11/src/Tensor/
DTensorArgMax.h134 template<typename ReduceOp, typename Dims, typename XprType>
135 struct traits<TensorTupleReducerOp<ReduceOp, Dims, XprType> > : public traits<XprType>
143 static const int NumDimensions = XprTraits::NumDimensions - array_size<Dims>::value;
147 template<typename ReduceOp, typename Dims, typename XprType>
148 struct eval<TensorTupleReducerOp<ReduceOp, Dims, XprType>, Eigen::Dense>
150 typedef const TensorTupleReducerOp<ReduceOp, Dims, XprType>& type;
153 template<typename ReduceOp, typename Dims, typename XprType>
154 struct nested<TensorTupleReducerOp<ReduceOp, Dims, XprType>, 1,
155 typename eval<TensorTupleReducerOp<ReduceOp, Dims, XprType> >::type>
157 typedef TensorTupleReducerOp<ReduceOp, Dims, XprType> type;
[all …]
/external/tensorflow/tensorflow/lite/kernels/perception/
Ddense_image_warp.cc41 const int channels = input_shape.Dims(3); in DenseImageWarp()
42 TFLITE_CHECK_EQ(flow_shape.Dims(3), 2); in DenseImageWarp()
110 TF_LITE_ENSURE_EQ(context, input_shape.Dims(0), flow_shape.Dims(0)); in Prepare()
111 TF_LITE_ENSURE_EQ(context, input_shape.Dims(1), flow_shape.Dims(1)); in Prepare()
112 TF_LITE_ENSURE_EQ(context, input_shape.Dims(2), flow_shape.Dims(2)); in Prepare()
113 TF_LITE_ENSURE_MSG(context, input_shape.Dims(1) >= 2, in Prepare()
115 TF_LITE_ENSURE_MSG(context, input_shape.Dims(2) >= 2, in Prepare()
117 TF_LITE_ENSURE_MSG(context, flow_shape.Dims(3) == 2, in Prepare()

1234567