Home
last modified time | relevance | path

Searched refs:dimensions_count (Results 1 – 25 of 32) sorted by relevance

12

/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dresolve_tensorflow_matmul.cc92 int dimensions_count = lhs_array.shape().dimensions_count(); in Run() local
93 if (dimensions_count < 2) { in Run()
96 dimensions_count); in Run()
102 perm.reserve(dimensions_count); in Run()
103 for (int i = 0; i < dimensions_count; ++i) { in Run()
106 std::swap(perm[dimensions_count - 1], perm[dimensions_count - 2]); in Run()
Dpropagate_fixed_sizes.cc91 int rank_x = input_shape_x.dimensions_count(); in ComputeBinaryOperatorOutputSize()
92 int rank_y = input_shape_y.dimensions_count(); in ComputeBinaryOperatorOutputSize()
132 CHECK(input_shape.dimensions_count() == 4) in ProcessConvOperator()
134 << "\" is " << input_shape.dimensions_count() << "D."; in ProcessConvOperator()
142 CHECK_EQ(weights_shape.dimensions_count(), 4); in ProcessConvOperator()
153 CHECK_EQ(output_array.shape().dimensions_count(), 4); in ProcessConvOperator()
188 CHECK(specified_output_shape_array.shape().dimensions_count() == 1 && in ProcessTransposeConvOperator()
204 CHECK_EQ(weights_shape.dimensions_count(), 4) in ProcessTransposeConvOperator()
231 CHECK_EQ(input_shape.dimensions_count(), 4) in ProcessTransposeConvOperator()
261 CHECK_EQ(input_shape.dimensions_count(), 4); in ProcessDepthwiseConvOperator()
[all …]
Dfuse_binary_into_preceding_affine.cc52 const int depth = bias_shape.dims(bias_shape.dimensions_count() - 1); in FuseAddOrSubParamsIntoPrecedingAffine()
54 if (operand_shape.dimensions_count() >= 1 && in FuseAddOrSubParamsIntoPrecedingAffine()
55 operand_shape.dims(operand_shape.dimensions_count() - 1) == in FuseAddOrSubParamsIntoPrecedingAffine()
56 bias_shape.dims(bias_shape.dimensions_count() - 1)) { in FuseAddOrSubParamsIntoPrecedingAffine()
58 } else if (operand_shape.dimensions_count() == 0 || in FuseAddOrSubParamsIntoPrecedingAffine()
59 operand_shape.dims(operand_shape.dimensions_count() - 1) == 1) { in FuseAddOrSubParamsIntoPrecedingAffine()
125 if (operand_shape.dimensions_count() >= 1 && in FuseMulOrDivParamsIntoPrecedingAffine()
126 operand_shape.dims(operand_shape.dimensions_count() - 1) == in FuseMulOrDivParamsIntoPrecedingAffine()
127 bias_shape.dims(bias_shape.dimensions_count() - 1)) { in FuseMulOrDivParamsIntoPrecedingAffine()
129 } else if (operand_shape.dimensions_count() == 0 || in FuseMulOrDivParamsIntoPrecedingAffine()
[all …]
Dresolve_constant_unary.cc56 std::vector<int> reduction_mask(input_shape.dimensions_count(), 1); in ReduceGeneric()
59 CHECK_LT(axis, input_shape.dimensions_count()); in ReduceGeneric()
64 std::vector<int> output_indices(input_shape.dimensions_count()); in ReduceGeneric()
69 for (int i = 0; i < input_shape.dimensions_count(); ++i) { in ReduceGeneric()
86 for (int i = 0; i < output_shape.dimensions_count(); ++i) { in ReduceGeneric()
211 const int output_dims_count = output_shape.dimensions_count(); in Run()
Dunroll_batch_matmul.cc41 int rank = input_array.shape().dimensions_count(); in SliceInput()
93 const int32 dims = input_array.shape().dimensions_count(); in GetTransposePerm()
105 const int32 dims = input_shape.dimensions_count(); in GetTransposeShape()
168 const int dims_a = input_array_a.shape().dimensions_count(); in Run()
169 const int dims_b = input_array_b.shape().dimensions_count(); in Run()
Dconvert_squeeze_to_reshape.cc50 if (input_array.shape().dimensions_count() == 0) { in Run()
64 if (output_shape.dimensions_count() == 0) { in Run()
Dconvert_trivial_pack_to_reshape.cc48 if (input_array.shape().dimensions_count() == 0) { in Run()
65 const int shape_array_dims = 1 + input_array.shape().dimensions_count(); in Run()
Didentify_nearest_upsample.cc122 if (const_array.shape().dimensions_count() != in Run()
123 nonconst_array.shape().dimensions_count()) { in Run()
160 for (; i < current_const_shape.dimensions_count() - 1; in Run()
174 for (; i < current_nonconst_shape.dimensions_count(); ++i) { in Run()
Dresolve_constant_binary.cc95 const int dims_count = output_shape.dimensions_count(); in EvaluateBinaryOperatorOnConstantInputs()
107 CHECK_EQ(input0_shape.dimensions_count(), input1_shape.dimensions_count()); in EvaluateBinaryOperatorOnConstantInputs()
108 CHECK_EQ(input0_shape.dimensions_count(), dims_count); in EvaluateBinaryOperatorOnConstantInputs()
Dresolve_constant_transpose.cc40 CHECK(input_shape.dimensions_count() == output_shape.dimensions_count()); in Transpose()
41 const int dim = input_shape.dimensions_count(); in Transpose()
Dremove_trivial_binary.cc92 if (input_array_0.shape().dimensions_count() == in Run()
93 input_array_1.shape().dimensions_count() && in Run()
Dshuffle_fc_weights.cc60 for (int i = 1; i < input_shape.dimensions_count() - 1; i++) { in Run()
92 if (weights_shape.dimensions_count() != 2) { in Run()
Dmove_binary_operator_before_reshape.cc29 int shape_end = shape.dimensions_count() - 1; in IsTailOfShape()
30 int tail_end = tail.dimensions_count() - 1; in IsTailOfShape()
Dresolve_constant_concatenation.cc83 for (int i = 0; i < concatenated_array->shape().dimensions_count(); i++) { in ConcatenateTensorBuffers()
93 for (int i = concatenation_axis; i < array_shape.dimensions_count(); i++) { in ConcatenateTensorBuffers()
Dremove_trivial_concatenation_input.cc49 input_array.has_shape() && input_array.shape().dimensions_count() == 0; in Run()
Dunpartition_embedding_lookup.cc199 partition_array.shape().dimensions_count(); in Run()
218 merged_gather_op->input_rank = partition_array.shape().dimensions_count(); in Run()
Dresolve_constant_shape_or_rank.cc59 output_buffer.data[0] = input_array.shape().dimensions_count(); in Run()
Dfuse_binary_into_following_affine.cc81 CHECK_EQ(output_depth, bias_shape.dims(bias_shape.dimensions_count() - 1)); in FuseAddOrSubParamsIntoFollowingAffine()
96 weights_shape.dims(weights_shape.dimensions_count() - 1); in FuseAddOrSubParamsIntoFollowingAffine()
Dresolve_strided_slice_attributes.cc82 int num_input_axes = input_array.shape().dimensions_count(); in Run()
Dconvert_reorder_axes.cc39 CHECK_EQ(input_shape.dimensions_count(), 4); in CreateReshapeFromReorderAxes()
/external/tensorflow/tensorflow/lite/kernels/internal/
Dtypes.h139 explicit RuntimeShape(int dimensions_count) : size_(dimensions_count) { in RuntimeShape() argument
140 if (dimensions_count > kMaxSmallSize) { in RuntimeShape()
144 dims_pointer_ = new int32[dimensions_count]; in RuntimeShape()
156 RuntimeShape(int dimensions_count, const int32* dims_data) : size_(0) { in RuntimeShape() argument
157 ReplaceWith(dimensions_count, dims_data); in RuntimeShape()
213 inline void Resize(int dimensions_count) { in Resize() argument
221 size_ = dimensions_count; in Resize()
222 if (dimensions_count > kMaxSmallSize) { in Resize()
226 dims_pointer_ = new int32[dimensions_count]; in Resize()
231 inline void ReplaceWith(int dimensions_count, const int32* dims_data) { in ReplaceWith() argument
[all …]
/external/tensorflow/tensorflow/lite/toco/
Dtooling_util.cc523 if (array_shape.dimensions_count() == 0) { in LogArray()
636 CHECK_GE(new_shape_size, shape->dimensions_count()); in ExtendShape()
637 const int size_increase = new_shape_size - shape->dimensions_count(); in ExtendShape()
644 CHECK_LE(new_shape_size, shape->dimensions_count()); in UnextendShape()
645 const int size_reduction = shape->dimensions_count() - new_shape_size; in UnextendShape()
673 for (int i = 0; i < shape.dimensions_count(); ++i) { in IsNonEmpty()
680 for (int i = 0; i < shape.dimensions_count(); ++i) { in CheckNonEmptyShapeDimensions()
692 if (shape1.dimensions_count() > shape0.dimensions_count()) { in ShapesAgreeUpToBroadcasting()
699 int longer_index = longer->dimensions_count() - 1; in ShapesAgreeUpToBroadcasting()
700 int shorter_index = shorter->dimensions_count() - 1; in ShapesAgreeUpToBroadcasting()
[all …]
Dtooling_util.h143 return ::tflite::RuntimeShape(shape.dimensions_count(), shape.dims().data());
221 DCHECK_EQ(shape.dimensions_count(), indices.size());
222 const int dims_count = shape.dimensions_count();
236 const int dims_count = shape.dimensions_count();
Ddump_graphviz.cc281 for (int dim = 0; dim < array_shape.dimensions_count(); dim++) { in GetArrayLabel()
283 if (dim + 1 < array_shape.dimensions_count()) { in GetArrayLabel()
297 if (array.shape().dimensions_count() > 0) { in GetArrayLabel()
306 if (array.shape().dimensions_count() > 0) { in GetArrayLabel()
Dexport_tensorflow.cc108 const int kDims = input_shape.dimensions_count(); in ExportFloatArray()
126 CHECK_EQ(input_shape.dimensions_count(), AxesCount(input_axes_order)); in ExportFloatArray()
236 for (int i = 0; i < array_shape.dimensions_count(); i++) { in ConvertBoolTensorConst()
260 for (int i = 0; i < array_shape.dimensions_count(); i++) { in ConvertIntTensorConst()
309 for (int i = 0; i < array_shape.dimensions_count(); i++) { in ConvertComplex64TensorConst()
476 CHECK_EQ(src_weights_shape.dimensions_count(), 4); in ConvertDepthwiseConvOperator()
605 CHECK_EQ(fc_weights_shape.dimensions_count(), 2); in ConvertFullyConnectedOperator()
831 for (int i = 0; i < input_shape.dimensions_count() - 1; ++i) { in ConvertSoftmaxOperator()
835 flattened_size, input_shape.dims(input_shape.dimensions_count() - 1)}; in ConvertSoftmaxOperator()
872 for (int i = 0; i < input_shape.dimensions_count() - 1; ++i) { in ConvertLogSoftmaxOperator()
[all …]

12