HomeSort by relevance Sort by last modified time
    Searched refs:ArrayDataType (Results 1 - 25 of 59) sorted by null

1 2 3

  /external/tensorflow/tensorflow/contrib/lite/toco/tflite/
types.cc 22 template <ArrayDataType T>
32 template <ArrayDataType T>
48 ::tflite::TensorType DataType::Serialize(ArrayDataType array_data_type) {
50 case ArrayDataType::kFloat:
52 case ArrayDataType::kInt32:
54 case ArrayDataType::kInt64:
56 case ArrayDataType::kUint8:
58 case ArrayDataType::kString:
67 ArrayDataType DataType::Deserialize(int tensor_type) {
70 return ArrayDataType::kFloat
    [all...]
types.h 26 static ::tflite::TensorType Serialize(ArrayDataType array_data_type);
27 static ArrayDataType Deserialize(int tensor_type);
types_test.cc 31 static const ArrayDataType kUnsupportedTocoTypes[] = {ArrayDataType::kNone,
32 ArrayDataType::kBool};
43 template <ArrayDataType T>
70 std::vector<std::pair<ArrayDataType, ::tflite::TensorType>> testdata = {
71 {ArrayDataType::kUint8, ::tflite::TensorType_UINT8},
72 {ArrayDataType::kInt32, ::tflite::TensorType_INT32},
73 {ArrayDataType::kInt64, ::tflite::TensorType_INT64},
74 {ArrayDataType::kFloat, ::tflite::TensorType_FLOAT32}};
87 for (ArrayDataType t : kUnsupportedTocoTypes)
    [all...]
  /external/tensorflow/tensorflow/contrib/lite/toco/graph_transformations/
resolve_multiply_by_zero.cc 39 template <ArrayDataType Type>
94 case ArrayDataType::kFloat: {
96 constant_input_array.GetBuffer<ArrayDataType::kFloat>().data;
97 if (!AreAllBufferElementsZero<DataType<ArrayDataType::kFloat>>(
101 FillArrayWithZeros<ArrayDataType::kFloat>(&output_array);
103 case ArrayDataType::kUint8: {
105 constant_input_array.GetBuffer<ArrayDataType::kUint8>().data;
106 if (!AreAllBufferElementsZero<DataType<ArrayDataType::kUint8>>(
110 FillArrayWithZeros<ArrayDataType::kUint8>(&output_array);
112 case ArrayDataType::kInt32:
    [all...]
lstm_utils.cc 25 void CopyArrayData(const Buffer<ArrayDataType::kFloat>& src_buffer,
27 Buffer<ArrayDataType::kFloat>* dst_buffer, int dst_stride,
41 Buffer<ArrayDataType::kFloat>* CreateFloatArrayBuffer(Model* model,
46 array.data_type = ArrayDataType::kFloat;
48 Buffer<ArrayDataType::kFloat>* buffer =
49 &(array.GetMutableBuffer<ArrayDataType::kFloat>());
61 Buffer<ArrayDataType::kFloat>* buffer =
63 auto& orig_buffer = original_array.GetBuffer<ArrayDataType::kFloat>();
71 void CopyArrayToSubArray(Buffer<ArrayDataType::kFloat>& tensor_buffer,
78 auto& sub_buffer = sub_array.GetBuffer<ArrayDataType::kFloat>()
    [all...]
resolve_constant_fill.cc 24 template <ArrayDataType Type>
56 if (output_array.data_type == ArrayDataType::kNone) {
78 case ArrayDataType::kFloat:
79 if (!ComputeFillArray<ArrayDataType::kFloat>(model, op)) {
83 case ArrayDataType::kUint8:
84 if (!ComputeFillArray<ArrayDataType::kUint8>(model, op)) {
88 case ArrayDataType::kInt32:
89 if (!ComputeFillArray<ArrayDataType::kInt32>(model, op)) {
93 case ArrayDataType::kInt64:
94 if (!ComputeFillArray<ArrayDataType::kInt64>(model, op))
    [all...]
resolve_constant_stack.cc 26 template <ArrayDataType Type>
63 if (output_array.data_type == ArrayDataType::kNone) {
82 case ArrayDataType::kFloat:
83 Stack<ArrayDataType::kFloat>(model, *op);
85 case ArrayDataType::kUint8:
86 Stack<ArrayDataType::kUint8>(model, *op);
88 case ArrayDataType::kInt32:
89 Stack<ArrayDataType::kInt32>(model, *op);
91 case ArrayDataType::kInt64:
92 Stack<ArrayDataType::kInt64>(model, *op)
    [all...]
make_initial_dequantize_operator.cc 55 if (input_array.data_type != ArrayDataType::kFloat) {
60 input_array.final_data_type == ArrayDataType::kNone) {
81 CHECK(input_array.final_data_type == ArrayDataType::kUint8);
82 input_array.data_type = ArrayDataType::kUint8;
83 dequantized_input_array.data_type = ArrayDataType::kFloat;
88 GetQuantizationParamsFromMinMax<ArrayDataType::kUint8>(
resolve_constant_range.cc 56 if (output_array.data_type == ArrayDataType::kNone) {
68 CHECK(start_array.data_type == ArrayDataType::kInt32)
70 CHECK(limit_array.data_type == ArrayDataType::kInt32)
72 CHECK(delta_array.data_type == ArrayDataType::kInt32)
76 int start = start_array.GetBuffer<ArrayDataType::kInt32>().data[0];
77 int limit = limit_array.GetBuffer<ArrayDataType::kInt32>().data[0];
78 int delta = delta_array.GetBuffer<ArrayDataType::kInt32>().data[0];
79 auto& buffer = output_array.GetMutableBuffer<ArrayDataType::kInt32>();
lstm_utils.h 62 Buffer<ArrayDataType::kFloat>* CreateFloatArrayBuffer(Model* model,
79 void CopyArrayData(const Buffer<ArrayDataType::kFloat>& src_buffer,
81 Buffer<ArrayDataType::kFloat>* dst_buffer, int dst_stride,
94 void CopyArrayToSubArray(Buffer<ArrayDataType::kFloat>& tensor_buffer,
propagate_array_data_types.cc 28 ArrayDataType data_type) {
42 model->GetArray(input).data_type == ArrayDataType::kNone) {
48 std::unordered_map<string, ArrayDataType> old_output_data_types;
56 SetDataTypeForAllOutputs(model, op, ArrayDataType::kFloat);
62 SetDataTypeForAllOutputs(model, op, ArrayDataType::kBool);
66 SetDataTypeForAllOutputs(model, op, ArrayDataType::kInt32);
72 const ArrayDataType data_type = model->GetArray(op->inputs[1]).data_type;
87 ArrayDataType data_type;
88 if (range_op->dtype != ArrayDataType::kNone) {
114 const ArrayDataType data_type = model->GetArray(op->inputs[0]).data_type
    [all...]
resolve_batch_normalization.cc 48 CHECK(mean_array.data_type == ArrayDataType::kFloat);
49 CHECK(multiplier_array.data_type == ArrayDataType::kFloat);
50 CHECK(offset_array.data_type == ArrayDataType::kFloat);
96 mul_param_array.data_type = ArrayDataType::kFloat;
97 add_param_array.data_type = ArrayDataType::kFloat;
99 mul_param_array.GetMutableBuffer<ArrayDataType::kFloat>().data;
101 add_param_array.GetMutableBuffer<ArrayDataType::kFloat>().data;
105 mean_array.GetBuffer<ArrayDataType::kFloat>().data;
107 multiplier_array.GetBuffer<ArrayDataType::kFloat>().data;
109 offset_array.GetBuffer<ArrayDataType::kFloat>().data
    [all...]
resolve_constant_strided_slice.cc 60 template <ArrayDataType Type>
139 if (output_array.data_type == ArrayDataType::kNone) {
167 case ArrayDataType::kFloat:
168 StridedSlice<ArrayDataType::kFloat>(*op, input_array, &output_array);
170 case ArrayDataType::kUint8:
171 StridedSlice<ArrayDataType::kUint8>(*op, input_array, &output_array);
173 case ArrayDataType::kInt32:
174 StridedSlice<ArrayDataType::kInt32>(*op, input_array, &output_array);
176 case ArrayDataType::kInt64:
177 StridedSlice<ArrayDataType::kInt64>(*op, input_array, &output_array)
    [all...]
resolve_constant_fake_quant.cc 49 CHECK(input_array.data_type == ArrayDataType::kFloat);
50 output_array.data_type = ArrayDataType::kFloat;
52 const auto& input_buffer = input_array.GetBuffer<ArrayDataType::kFloat>();
54 auto& output_buffer = output_array.GetMutableBuffer<ArrayDataType::kFloat>();
58 GetQuantizationParamsFromMinMax<ArrayDataType::kUint8>(
resolve_reorder_axes.cc 32 template <typename T, ArrayDataType DataType>
71 if (input_array.buffer->type == ArrayDataType::kFloat) {
72 ReorderAxes<float, ArrayDataType::kFloat>(reorder_op->input_axes_order,
75 } else if (input_array.buffer->type == ArrayDataType::kInt32) {
76 ReorderAxes<uint8, ArrayDataType::kUint8>(reorder_op->input_axes_order,
dequantize.cc 30 template <ArrayDataType A>
34 array->data_type = ArrayDataType::kFloat;
35 auto& new_data = array->GetMutableBuffer<ArrayDataType::kFloat>().data;
88 if (array->data_type == ArrayDataType::kUint8) {
89 DequantizeBuffer<ArrayDataType::kUint8>(array);
90 } else if (array->data_type == ArrayDataType::kInt32) {
91 DequantizeBuffer<ArrayDataType::kInt32>(array);
95 CHECK(array->data_type == ArrayDataType::kFloat);
96 CHECK(array->buffer->type == ArrayDataType::kFloat);
102 array->data_type = ArrayDataType::kFloat
    [all...]
quantize.cc 55 template <ArrayDataType A>
60 CHECK(buffer.type == ArrayDataType::kFloat);
62 static_cast<const Buffer<ArrayDataType::kFloat>&>(buffer);
85 template <ArrayDataType A>
90 CHECK(array.data_type == ArrayDataType::kFloat);
101 const string& name, ArrayDataType quantized_data_type,
104 case ArrayDataType::kUint8:
105 return QuantizeArray<ArrayDataType::kUint8>(transformation, model, name,
107 case ArrayDataType::kInt16:
108 return QuantizeArray<ArrayDataType::kInt16>(transformation, model, name
    [all...]
resolve_constant_concatenation.cc 34 template <ArrayDataType A, typename T>
77 template <ArrayDataType A>
110 CHECK(concatenated_array->data_type == ArrayDataType::kFloat);
165 case ArrayDataType::kFloat:
166 ConcatenateTensorBuffers<ArrayDataType::kFloat>(
170 case ArrayDataType::kUint8:
171 ConcatenateTensorBuffers<ArrayDataType::kUint8>(
174 case ArrayDataType::kInt32:
175 ConcatenateTensorBuffers<ArrayDataType::kInt32>(
178 case ArrayDataType::kInt64
    [all...]
resolve_constant_unary.cc 83 std::vector<DataType<ArrayDataType::kFloat>> const* input_float_data;
86 if (cast_op->dst_data_type != ArrayDataType::kFloat) {
100 if (input_array.buffer->type != ArrayDataType::kFloat) {
103 input_float_data = &(input_array.GetBuffer<ArrayDataType::kFloat>().data);
111 output_array.GetMutableBuffer<ArrayDataType::kFloat>().data;
119 if (input_array.buffer->type == ArrayDataType::kFloat) {
121 input_array.GetBuffer<ArrayDataType::kFloat>().data[i]);
122 } else if (input_array.buffer->type == ArrayDataType::kUint8) {
124 input_array.GetBuffer<ArrayDataType::kUint8>().data[i]);
125 } else if (input_array.buffer->type == ArrayDataType::kInt32)
    [all...]
resolve_slice_attributes.cc 45 op->begin = begin_array.GetBuffer<ArrayDataType::kInt32>().data;
46 op->size = size_array.GetBuffer<ArrayDataType::kInt32>().data;
resolve_strided_slice_attributes.cc 51 op->start_indices = start_array.GetBuffer<ArrayDataType::kInt32>().data;
52 op->stop_indices = stop_array.GetBuffer<ArrayDataType::kInt32>().data;
53 op->strides = stride_array.GetBuffer<ArrayDataType::kInt32>().data;
resolve_constant_binary.cc 63 template <ArrayDataType InputsDataType, ArrayDataType OutputDataType>
179 TOCO_HANDLE_CASE(ArrayDataType::kFloat, ArrayDataType::kFloat)
180 TOCO_HANDLE_CASE(ArrayDataType::kFloat, ArrayDataType::kBool)
181 TOCO_HANDLE_CASE(ArrayDataType::kInt32, ArrayDataType::kInt32)
182 TOCO_HANDLE_CASE(ArrayDataType::kInt32, ArrayDataType::kBool
    [all...]
resolve_constant_transpose.cc 28 template <ArrayDataType Type>
115 if (output_array.data_type == ArrayDataType::kNone) {
145 case ArrayDataType::kFloat:
146 Transpose<ArrayDataType::kFloat>(model, input_array, op->perm,
149 case ArrayDataType::kUint8:
150 Transpose<ArrayDataType::kUint8>(model, input_array, op->perm,
153 case ArrayDataType::kInt32:
154 Transpose<ArrayDataType::kInt32>(model, input_array, op->perm,
157 case ArrayDataType::kInt64:
158 Transpose<ArrayDataType::kInt64>(model, input_array, op->perm
    [all...]
  /external/tensorflow/tensorflow/contrib/lite/toco/
model.h 162 enum class ArrayDataType {
177 // Compile-time logic to map ArrayDataType to the corresponding C++ scalar type
178 template <ArrayDataType A>
181 struct DataTypeImpl<ArrayDataType::kNone> {
185 struct DataTypeImpl<ArrayDataType::kBool> {
189 struct DataTypeImpl<ArrayDataType::kFloat> {
193 struct DataTypeImpl<ArrayDataType::kInt8> {
197 struct DataTypeImpl<ArrayDataType::kUint8> {
201 struct DataTypeImpl<ArrayDataType::kInt16> {
205 struct DataTypeImpl<ArrayDataType::kUint16>
    [all...]
  /external/tensorflow/tensorflow/contrib/lite/toco/graph_transformations/tests/
resolve_constant_concatenation_test.cc 127 in_array.data_type = ArrayDataType::kFloat;
136 in_array.GetMutableBuffer<toco::ArrayDataType::kFloat>();
139 in_array.GetMutableBuffer<toco::ArrayDataType::kFloat>().data.data();
148 out_array.data_type = ArrayDataType::kFloat;
175 EXPECT_THAT(concatenated_array->GetBuffer<toco::ArrayDataType::kFloat>().data,
194 EXPECT_THAT(concatenated_array->GetBuffer<toco::ArrayDataType::kFloat>().data,
213 EXPECT_THAT(concatenated_array->GetBuffer<toco::ArrayDataType::kFloat>().data,

Completed in 133 milliseconds

1 2 3