Home
last modified time | relevance | path

Searched refs:input_dims (Results 1 – 25 of 157) sorted by relevance

1234567

/external/tensorflow/tensorflow/core/kernels/
Deigen_benchmark.h46 void SpatialConvolution(Dimensions input_dims, Dimensions filter_dims) { in SpatialConvolution() argument
47 Dimensions output_dims(input_dims[0], // batch in SpatialConvolution()
48 input_dims[1], // input_height in SpatialConvolution()
49 input_dims[2], // input_width in SpatialConvolution()
53 static_cast<Scalar*>(device_.allocate(BufferSize(input_dims))); in SpatialConvolution()
59 device_.memset(input_data, 123, BufferSize(input_dims)); in SpatialConvolution()
62 Input input(input_data, input_dims); in SpatialConvolution()
76 void SpatialConvolutionBackwardInput(Dimensions input_dims, in SpatialConvolutionBackwardInput() argument
81 Dimensions output_dims(input_dims[0], // batch in SpatialConvolutionBackwardInput()
82 input_dims[1], // input_height in SpatialConvolutionBackwardInput()
[all …]
Dconv_2d_gpu.h187 Dimension<3> input_dims,
190 output_dims[sp0] = input_dims[0];
191 output_dims[sp1] = input_dims[1];
192 output_dims[sp2] = input_dims[2];
206 int input_index = TensorIndexToFlat(input_tensor_index, input_dims);
218 Dimension<3> input_dims,
221 output_dims[sp0] = input_dims[0];
222 output_dims[sp1] = input_dims[1];
223 output_dims[sp2] = input_dims[2];
242 int input_index_i = TensorIndexToFlat(input_tensor_index, input_dims);
[all …]
Dreduce_join_op.cc77 int32 input_dims) { in GetReducedIndices() argument
84 reduced_indices[i] += reduced_indices[i] < 0 ? input_dims : 0; in GetReducedIndices()
92 int32 input_dims, in MakeUnreducedIndices() argument
94 for (int32 index = 0; index < input_dims; ++index) { in MakeUnreducedIndices()
127 const int32 input_dims = input_shape.dims(); in Compute() local
133 gtl::InlinedVector<bool, 8> index_is_reduced(input_dims, false); in Compute()
137 reduce_index < 0 ? reduce_index + input_dims : reduce_index; in Compute()
139 context, reduce_index >= -input_dims && reduce_index < input_dims, in Compute()
141 " for input with ", input_dims, " dimension(s)")); in Compute()
149 GetReducedIndices(reduction_indices, input_dims); in Compute()
[all …]
Dsparse_slice_op.cc58 const int input_dims = input_shape.NumElements(); in Compute() local
59 OP_REQUIRES(context, input_dims == input_start.NumElements(), in Compute()
61 "Expected start to be a vector of length ", input_dims, in Compute()
64 OP_REQUIRES(context, input_dims == input_size.NumElements(), in Compute()
66 "Expected size to be a vector of length ", input_dims, in Compute()
76 input_dims); in Compute()
78 input_dims); in Compute()
/external/tensorflow/tensorflow/lite/micro/kernels/
Dresize_nearest_neighbor_test.cc49 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestResizeNearestNeighbor() local
61 TestCreateTensor(input_data, input_dims), in TestResizeNearestNeighbor()
96 const int input_dims[] = {4, 1, 1, 2, 1}; in TF_LITE_MICRO_TEST() local
104 input_dims, input_data, expected_size_data, expected_output_data, in TF_LITE_MICRO_TEST()
108 const int input_dims[] = {4, 1, 1, 2, 1}; in TF_LITE_MICRO_TEST() local
116 input_dims, input_data, expected_size_data, expected_output_data, in TF_LITE_MICRO_TEST()
120 const int input_dims[] = {4, 1, 1, 2, 1}; in TF_LITE_MICRO_TEST() local
128 input_dims, input_data, expected_size_data, expected_output_data, in TF_LITE_MICRO_TEST()
132 const int input_dims[] = {4, 1, 2, 1, 1}; in TF_LITE_MICRO_TEST() local
140 input_dims, input_data, expected_size_data, expected_output_data, in TF_LITE_MICRO_TEST()
[all …]
Dl2norm_test.cc99 const int input_dims[] = {4, 1, 1, 1, 6}; in TF_LITE_MICRO_TEST() local
107 input_dims, input_data, expected_output_data, output_data); in TF_LITE_MICRO_TEST()
111 const int input_dims[] = {4, 1, 1, 1, 6}; in TF_LITE_MICRO_TEST() local
118 input_dims, input_data, expected_output_data, output_data); in TF_LITE_MICRO_TEST()
122 const int input_dims[] = {4, 1, 1, 1, 6}; in TF_LITE_MICRO_TEST() local
130 input_dims, input_data, expected_output_data, output_data); in TF_LITE_MICRO_TEST()
134 const int input_dims[] = {4, 3, 1, 1, 6}; in TF_LITE_MICRO_TEST() local
149 input_dims, input_data, expected_output_data, output_data); in TF_LITE_MICRO_TEST()
153 const int input_dims[] = {4, 1, 1, 1, 6}; in TF_LITE_MICRO_TEST() local
159 tflite::testing::TestL2Normalization<uint8_t>(input_dims, input_data, in TF_LITE_MICRO_TEST()
[all …]
Darg_min_max_test.cc54 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestArgMinMaxFloat() local
63 CreateTensor(input_values, input_dims), in TestArgMinMaxFloat()
80 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestArgMinMaxQuantized() local
89 CreateQuantizedTensor(input_values, input_quantized, input_dims, in TestArgMinMaxQuantized()
107 const int input_dims[] = {4, 1, 1, 1, 4}; in TF_LITE_MICRO_TEST() local
114 tflite::testing::TestArgMinMaxFloat(input_dims, input_values, axis_dims, in TF_LITE_MICRO_TEST()
121 const int input_dims[] = {4, 1, 1, 1, 4}; in TF_LITE_MICRO_TEST() local
128 tflite::testing::TestArgMinMaxFloat(input_dims, input_values, axis_dims, in TF_LITE_MICRO_TEST()
136 const int input_dims[] = {4, 1, 1, 1, input_size}; in TF_LITE_MICRO_TEST() local
148 input_dims, input_values, input_quantized, input_scale, input_zero_point, in TF_LITE_MICRO_TEST()
[all …]
Dreshape_test.cc121 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestReshape() local
124 TfLiteTensor input_tensor = CreateTensor(input_data, input_dims); in TestReshape()
142 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestReshapeQuantized() local
146 input_data, input_dims, /*scale=*/1.f, /*zero_point=*/0); in TestReshapeQuantized()
163 const int input_dims[] = {4, 1, 2, 4, 1}; in TF_LITE_MICRO_TEST() local
173 input_dims, input_data, shape_dims, shape_int32, output_dims, output_data, in TF_LITE_MICRO_TEST()
179 const int input_dims[] = {9, 1, 1, 2, 1, 1, 1, 1, 1, 1}; in TF_LITE_MICRO_TEST() local
189 input_dims, input, shape_dims, shape_int32, output_dims, output_data, in TF_LITE_MICRO_TEST()
195 const int input_dims[] = {4, 1, 2, 4, 11}; in TF_LITE_MICRO_TEST() local
205 input_dims, input, shape_dims, shape_int32, output_dims, output_data, in TF_LITE_MICRO_TEST()
[all …]
Dpad_test.cc97 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestPadFloat() local
104 TfLiteTensor tensors[tensors_size] = {CreateTensor(input_data, input_dims), in TestPadFloat()
122 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestPadV2Float() local
132 CreateTensor(input_data, input_dims), CreateTensor(pad_data, pad_dims), in TestPadV2Float()
152 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestPadQuantized() local
160 CreateQuantizedTensor(input_data, input_quantized, input_dims, in TestPadQuantized()
188 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestPadV2Quantized() local
199 CreateQuantizedTensor(input_data, input_quantized, input_dims, in TestPadV2Quantized()
227 const int input_dims[] = {4, 1, 2, 2, 1}; in TF_LITE_MICRO_TEST() local
236 tflite::testing::TestPadFloat(input_dims, input_values, pad_dims, pad_values, in TF_LITE_MICRO_TEST()
[all …]
Dzeros_like_test.cc29 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestZerosLikeFloat() local
36 CreateTensor(input_data, input_dims), in TestZerosLikeFloat()
61 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestZerosLikeInt32() local
68 CreateTensor(input_data, input_dims), in TestZerosLikeInt32()
93 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestZerosLikeInt64() local
100 CreateTensor(input_data, input_dims), in TestZerosLikeInt64()
130 const int input_dims[] = {2, 2, 3}; in TF_LITE_MICRO_TEST() local
133 tflite::testing::TestZerosLikeFloat(input_dims, input_values, golden, in TF_LITE_MICRO_TEST()
139 const int input_dims[] = {4, 1, 2, 2, 1}; in TF_LITE_MICRO_TEST() local
142 tflite::testing::TestZerosLikeInt32(input_dims, input_values, golden, in TF_LITE_MICRO_TEST()
[all …]
Dcast_test.cc30 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestCastFloatToInt8() local
37 CreateTensor(input_data, input_dims), in TestCastFloatToInt8()
62 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestCastInt8ToFloat() local
69 CreateTensor(input_data, input_dims), in TestCastInt8ToFloat()
99 const int input_dims[] = {2, 3, 2}; in TF_LITE_MICRO_TEST() local
104 tflite::testing::TestCastFloatToInt8(input_dims, input_values, golden, in TF_LITE_MICRO_TEST()
110 const int input_dims[] = {2, 3, 2}; in TF_LITE_MICRO_TEST() local
113 tflite::testing::TestCastInt8ToFloat(input_dims, input_values, golden, in TF_LITE_MICRO_TEST()
Dround_test.cc29 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestRound() local
36 CreateTensor(input_data, input_dims), in TestRound()
64 const int input_dims[] = {1, 6}; in TF_LITE_MICRO_TEST() local
68 tflite::testing::TestRound(input_dims, input_data, golden, output_data); in TF_LITE_MICRO_TEST()
72 const int input_dims[] = {4, 2, 1, 1, 6}; in TF_LITE_MICRO_TEST() local
77 tflite::testing::TestRound(input_dims, input_data, golden, output_data); in TF_LITE_MICRO_TEST()
Dceil_test.cc29 TfLiteIntArray* input_dims = IntArrayFromInts(input_dims_data); in TestCeil() local
36 CreateTensor(input_data, input_dims), in TestCeil()
66 const int input_dims[] = {1, 2}; in TF_LITE_MICRO_TEST() local
69 tflite::testing::TestCeil(input_dims, input_values, golden, output_data); in TF_LITE_MICRO_TEST()
74 const int input_dims[] = {4, 2, 1, 1, 5}; in TF_LITE_MICRO_TEST() local
80 tflite::testing::TestCeil(input_dims, input_values, golden, output_data); in TF_LITE_MICRO_TEST()
/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dlegacy_reference_ops.h42 inline void DepthwiseConv(const float* input_data, const Dims<4>& input_dims, in DepthwiseConv() argument
64 DepthwiseConv(op_params, DimsToShape(input_dims), input_data, in DepthwiseConv()
69 inline void DepthwiseConv(const float* input_data, const Dims<4>& input_dims, in DepthwiseConv() argument
77 DepthwiseConv(input_data, input_dims, filter_data, filter_dims, bias_data, in DepthwiseConv()
85 void DepthwiseConv(const float* input_data, const Dims<4>& input_dims, in DepthwiseConv() argument
93 DepthwiseConv(input_data, input_dims, filter_data, filter_dims, bias_data, in DepthwiseConv()
101 void DepthwiseConv(const float* input_data, const Dims<4>& input_dims, in DepthwiseConv() argument
106 DepthwiseConv<Ac>(input_data, input_dims, filter_data, filter_dims, bias_data, in DepthwiseConv()
111 inline void DepthwiseConv(const uint8* input_data, const Dims<4>& input_dims, in DepthwiseConv() argument
141 DepthwiseConv(op_params, DimsToShape(input_dims), input_data, in DepthwiseConv()
[all …]
Dreduce.h34 inline bool Reduce(const In* input_data, const int* input_dims, in Reduce() argument
47 ReducedOutputOffset(input_num_dims, input_dims, input_iter, 0, nullptr); in Reduce()
48 size_t output_offset = ReducedOutputOffset(input_num_dims, input_dims, in Reduce()
52 } while (NextIndex(input_num_dims, input_dims, input_iter)); in Reduce()
93 inline bool ReduceSumImpl(const In* input_data, const int* input_dims, in ReduceSumImpl() argument
102 return Reduce<In, Out>(input_data, input_dims, output_dims, input_num_dims, in ReduceSumImpl()
128 inline bool ReduceGeneric(const T* input_data, const int* input_dims, in ReduceGeneric() argument
137 if (input_dims[i] == 0) return true; in ReduceGeneric()
153 return Reduce<T, T>(input_data, input_dims, output_dims, input_num_dims, in ReduceGeneric()
162 inline bool Mean(const T* input_data, const int* input_dims, in Mean() argument
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dslice_op.cc46 const int input_dims = input_shape.dims(); in Compile() local
51 begin_tensor_shape.num_elements() == input_dims && in Compile()
52 size_tensor_shape.num_elements() == input_dims, in Compile()
55 input_dims, ", but got shapes ", begin_tensor_shape.DebugString(), in Compile()
66 for (int i = 0; i < input_dims; ++i) { in Compile()
75 for (int i = 0; i < input_dims; ++i) { in Compile()
124 for (int i = 0; i < input_dims; ++i) { in Compile()
138 scalar_indices.reserve(input_dims); in Compile()
140 for (int i = 0; i < input_dims; i++) { in Compile()
154 for (xla::int64 i = 0; i < input_dims; ++i) { in Compile()
[all …]
Droll_op.cc34 int64 input_dims = input_shape.dims(); in Compile() local
35 OP_REQUIRES(ctx, input_dims >= 1, in Compile()
58 OP_REQUIRES(ctx, cur_axis >= -input_dims && cur_axis < input_dims, in Compile()
61 input_dims, ", ", input_dims, ")."))); in Compile()
63 cur_axis += input_dims; in Compile()
/external/libtextclassifier/native/utils/tflite/
Dblacklist_base.cc39 TfLiteIntArray* input_dims = op->GetInputShape(context, node); in Resize() local
40 TfLiteIntArray* output_dims = TfLiteIntArrayCreate(input_dims->size + 1); in Resize()
41 for (int i = 0; i < input_dims->size; i++) { in Resize()
42 output_dims->data[i] = input_dims->data[i]; in Resize()
44 output_dims->data[input_dims->size] = op->categories(); in Resize()
56 TfLiteIntArray* input_dims = op->GetInputShape(context, node); in Eval() local
58 for (int i = 0; i < input_dims->size; i++) { in Eval()
59 input_size *= input_dims->data[i]; in Eval()
/external/tensorflow/tensorflow/lite/delegates/gpu/common/
Dquantization_util_test.cc149 auto input_dims = BuildTfLiteIntArray({1, 3, 2, 1}); in TEST() local
154 data.data(), input_dims.get(), "input", in TEST()
157 dequantized_data.data(), input_dims.get(), "input_dequant", in TEST()
174 auto input_dims = BuildTfLiteIntArray({1, 3, 2, 1}); in TEST() local
179 CreateQuantizedTensor(data.data(), input_dims.get(), "input", in TEST()
182 dequantized_data.data(), input_dims.get(), "input_dequant", in TEST()
199 auto input_dims = BuildTfLiteIntArray({1, 3, 2, 1}); in TEST() local
202 TfLiteTensor output = CreateFloatTensor(data.data(), input_dims.get(), in TEST()
205 quantized_data.data(), input_dims.get(), "output_quant", in TEST()
221 auto input_dims = BuildTfLiteIntArray({1, 3, 2, 1}); in TEST() local
[all …]
/external/tensorflow/tensorflow/lite/micro/kernels/cmsis_nn/
Dconv.cc63 cmsis_nn_dims input_dims; in Prepare() local
64 input_dims.n = MatchingDim(input_shape, 0, output_shape, 0); in Prepare()
65 input_dims.h = input->dims->data[1]; in Prepare()
66 input_dims.w = input->dims->data[2]; in Prepare()
67 input_dims.c = input_shape.Dims(3); in Prepare()
74 filter_dims.c = input_dims.c; in Prepare()
78 output_dims.n = input_dims.n; in Prepare()
97 context, node, params, input_dims.w, input_dims.h, filter_dims.w, in Prepare()
116 &conv_params, &input_dims, &filter_dims, &output_dims); in Prepare()
176 cmsis_nn_dims input_dims; in EvalQuantizedPerChannel() local
[all …]
/external/tensorflow/tensorflow/lite/kernels/
Dmirror_pad.cc48 const TfLiteIntArray* input_dims = nullptr; member
85 const int input_dims = NumDimensions(input); in GetPaddedOutputShape() local
87 TfLiteIntArrayCreate(input_dims), TfLiteIntArrayFree); in GetPaddedOutputShape()
90 for (int i = 0; i < input_dims; ++i) { in GetPaddedOutputShape()
136 eval_data->input_dims->data[i], eval_data->offset); in GetFlatIndex()
175 const int input_dims = NumDimensions(input_tensor); in Eval() local
188 std::vector<int> output_dims_num_elements(input_dims, 1); in Eval()
189 std::vector<int> input_dims_num_elements(input_dims, 1); in Eval()
190 for (int i = input_dims - 2; i >= 0; i--) { in Eval()
209 eval_data.input_dims = input_tensor->dims; \ in Eval()
[all …]
/external/tensorflow/tensorflow/compiler/xla/tests/
Dconvolution_test.cc245 std::vector<int64> input_dims = {1, 4, 2, 3, 3}; in XLA_TEST_F() local
247 Shape input_shape = ShapeUtil::MakeShape(F32, input_dims); in XLA_TEST_F()
277 auto input_r5 = input_r1.Reshape(input_dims).ConsumeValueOrDie(); in XLA_TEST_F()
311 std::vector<int64> input_dims = {1, 3, 3, 5}; in RunTest() local
313 Shape input_shape = ShapeUtil::MakeShapeWithType<T>(input_dims); in RunTest()
340 auto input_r4 = input_r1.Reshape(input_dims).ConsumeValueOrDie(); in RunTest()
370 std::vector<int64> input_dims = {1, 3, 3, 5}; in RunTest() local
372 Shape input_shape = ShapeUtil::MakeShapeWithType<T>(input_dims); in RunTest()
400 auto input_r4 = input_r1.Reshape(input_dims).ConsumeValueOrDie(); in RunTest()
436 std::vector<int64> input_dims = {1, 4, 4, 5}; in RunTest() local
[all …]
Dreverse_test.cc43 std::vector<int64> input_dims; member
49 "reverse_%s_in_dims_%s_%s", absl::StrJoin(input_dims, "x"), in ToTestCaseName()
84 ShapeUtil::ElementsIn(ShapeUtil::MakeShape(F32, spec.input_dims))); in TEST_P()
87 auto input_literal = r1_literal.Reshape(spec.input_dims).ConsumeValueOrDie(); in TEST_P()
94 std::vector<int64> output_indices(spec.input_dims.size()); in TEST_P()
101 output_indices[dim] = (spec.input_dims[dim] - 1) - indices[dim]; in TEST_P()
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dreorder_reshape_transpose.cc58 std::vector<int> ComputeNewPerm(std::vector<int> input_dims, in ComputeNewPerm() argument
63 for (size_t i = 0; i < input_dims.size(); i++) { in ComputeNewPerm()
64 if (input_dims[i] != 1) { in ComputeNewPerm()
82 new_perm.reserve(input_dims.size()); in ComputeNewPerm()
90 for (size_t index = 0; index < input_dims.size(); index++) { in ComputeNewPerm()
91 if (input_dims[index] == 1) { in ComputeNewPerm()
96 CHECK_EQ(new_perm.size(), input_dims.size()); in ComputeNewPerm()
171 std::vector<int> input_dims = input_shape.dims(); in Run() local
217 ComputeNewPerm(input_dims, intermediate_dims, transpose_op->perm); in Run()
218 CHECK_EQ(input_dims.size(), new_perm.size()); in Run()
/external/XNNPACK/test/
Dconstant-pad-operator-tester.h114 std::array<size_t, XNN_MAX_TENSOR_DIMS> input_dims; in TestX32() local
118 std::fill(input_dims.begin(), input_dims.end(), 1); in TestX32()
123 input_dims[XNN_MAX_TENSOR_DIMS - num_dims() + i] = input_dim(i); in TestX32()
136 input_stride *= input_dims[i - 1]; in TestX32()
150 for (size_t i = 0; i < input_dims[0]; i++) { in TestX32()
151 for (size_t j = 0; j < input_dims[1]; j++) { in TestX32()
152 for (size_t k = 0; k < input_dims[2]; k++) { in TestX32()
153 for (size_t l = 0; l < input_dims[3]; l++) { in TestX32()
154 for (size_t m = 0; m < input_dims[4]; m++) { in TestX32()
155 for (size_t n = 0; n < input_dims[5]; n++) { in TestX32()

1234567