Converted speech example to int8 model
PiperOrigin-RevId: 313256375 Change-Id: I716b53e8f663dbbd0d78701996f416ed122d1f23
This commit is contained in:
parent
e7cc47384f
commit
ee53e70b81
@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/examples/micro_speech/micro_features/micro_features_generator.h"
|
||||
#include "tensorflow/lite/micro/examples/micro_speech/micro_features/micro_model_settings.h"
|
||||
|
||||
FeatureProvider::FeatureProvider(int feature_size, uint8_t* feature_data)
|
||||
FeatureProvider::FeatureProvider(int feature_size, int8_t* feature_data)
|
||||
: feature_size_(feature_size),
|
||||
feature_data_(feature_data),
|
||||
is_first_run_(true) {
|
||||
@ -77,10 +77,10 @@ TfLiteStatus FeatureProvider::PopulateFeatureData(
|
||||
// +-----------+ +-----------+
|
||||
if (slices_to_keep > 0) {
|
||||
for (int dest_slice = 0; dest_slice < slices_to_keep; ++dest_slice) {
|
||||
uint8_t* dest_slice_data =
|
||||
int8_t* dest_slice_data =
|
||||
feature_data_ + (dest_slice * kFeatureSliceSize);
|
||||
const int src_slice = dest_slice + slices_to_drop;
|
||||
const uint8_t* src_slice_data =
|
||||
const int8_t* src_slice_data =
|
||||
feature_data_ + (src_slice * kFeatureSliceSize);
|
||||
for (int i = 0; i < kFeatureSliceSize; ++i) {
|
||||
dest_slice_data[i] = src_slice_data[i];
|
||||
@ -106,7 +106,7 @@ TfLiteStatus FeatureProvider::PopulateFeatureData(
|
||||
audio_samples_size, kMaxAudioSampleSize);
|
||||
return kTfLiteError;
|
||||
}
|
||||
uint8_t* new_slice_data = feature_data_ + (new_slice * kFeatureSliceSize);
|
||||
int8_t* new_slice_data = feature_data_ + (new_slice * kFeatureSliceSize);
|
||||
size_t num_samples_read;
|
||||
TfLiteStatus generate_status = GenerateMicroFeatures(
|
||||
error_reporter, audio_samples, audio_samples_size, kFeatureSliceSize,
|
||||
|
@ -32,7 +32,7 @@ class FeatureProvider {
|
||||
// remain accessible for the lifetime of the provider object, since subsequent
|
||||
// calls will fill it with feature data. The provider does no memory
|
||||
// management of this data.
|
||||
FeatureProvider(int feature_size, uint8_t* feature_data);
|
||||
FeatureProvider(int feature_size, int8_t* feature_data);
|
||||
~FeatureProvider();
|
||||
|
||||
// Fills the feature data with information from audio inputs, and returns how
|
||||
@ -43,7 +43,7 @@ class FeatureProvider {
|
||||
|
||||
private:
|
||||
int feature_size_;
|
||||
uint8_t* feature_data_;
|
||||
int8_t* feature_data_;
|
||||
// Make sure we don't try to use cached information if this is the first call
|
||||
// into the provider.
|
||||
bool is_first_run_;
|
||||
|
@ -27,7 +27,7 @@ TF_LITE_MICRO_TEST(TestFeatureProviderMockYes) {
|
||||
tflite::MicroErrorReporter micro_error_reporter;
|
||||
tflite::ErrorReporter* error_reporter = µ_error_reporter;
|
||||
|
||||
uint8_t feature_data[kFeatureElementCount];
|
||||
int8_t feature_data[kFeatureElementCount];
|
||||
FeatureProvider feature_provider(kFeatureElementCount, feature_data);
|
||||
|
||||
int how_many_new_slices = 0;
|
||||
@ -47,7 +47,7 @@ TF_LITE_MICRO_TEST(TestFeatureProviderMockNo) {
|
||||
tflite::MicroErrorReporter micro_error_reporter;
|
||||
tflite::ErrorReporter* error_reporter = µ_error_reporter;
|
||||
|
||||
uint8_t feature_data[kFeatureElementCount];
|
||||
int8_t feature_data[kFeatureElementCount];
|
||||
FeatureProvider feature_provider(kFeatureElementCount, feature_data);
|
||||
|
||||
int how_many_new_slices = 0;
|
||||
|
@ -26,7 +26,7 @@ TF_LITE_MICRO_TEST(TestFeatureProvider) {
|
||||
tflite::MicroErrorReporter micro_error_reporter;
|
||||
tflite::ErrorReporter* error_reporter = µ_error_reporter;
|
||||
|
||||
uint8_t feature_data[kFeatureElementCount];
|
||||
int8_t feature_data[kFeatureElementCount];
|
||||
FeatureProvider feature_provider(kFeatureElementCount, feature_data);
|
||||
|
||||
int how_many_new_slices = 0;
|
||||
|
@ -43,8 +43,8 @@ int32_t previous_time = 0;
|
||||
// determined by experimentation.
|
||||
constexpr int kTensorArenaSize = 10 * 1024;
|
||||
uint8_t tensor_arena[kTensorArenaSize];
|
||||
uint8_t feature_buffer[kFeatureElementCount];
|
||||
uint8_t* model_input_buffer = nullptr;
|
||||
int8_t feature_buffer[kFeatureElementCount];
|
||||
int8_t* model_input_buffer = nullptr;
|
||||
} // namespace
|
||||
|
||||
// The name of this function is important for Arduino compatibility.
|
||||
@ -74,19 +74,28 @@ void setup() {
|
||||
//
|
||||
// tflite::ops::micro::AllOpsResolver resolver;
|
||||
// NOLINTNEXTLINE(runtime-global-variables)
|
||||
static tflite::MicroOpResolver<3> micro_op_resolver(error_reporter);
|
||||
static tflite::MicroOpResolver<4> micro_op_resolver(error_reporter);
|
||||
if (micro_op_resolver.AddBuiltin(
|
||||
tflite::BuiltinOperator_DEPTHWISE_CONV_2D,
|
||||
tflite::ops::micro::Register_DEPTHWISE_CONV_2D()) != kTfLiteOk) {
|
||||
tflite::ops::micro::Register_DEPTHWISE_CONV_2D(),
|
||||
tflite::MicroOpResolverAnyVersion()) != kTfLiteOk) {
|
||||
return;
|
||||
}
|
||||
if (micro_op_resolver.AddBuiltin(
|
||||
tflite::BuiltinOperator_FULLY_CONNECTED,
|
||||
tflite::ops::micro::Register_FULLY_CONNECTED()) != kTfLiteOk) {
|
||||
tflite::ops::micro::Register_FULLY_CONNECTED(),
|
||||
tflite::MicroOpResolverAnyVersion()) != kTfLiteOk) {
|
||||
return;
|
||||
}
|
||||
if (micro_op_resolver.AddBuiltin(tflite::BuiltinOperator_SOFTMAX,
|
||||
tflite::ops::micro::Register_SOFTMAX()) !=
|
||||
tflite::ops::micro::Register_SOFTMAX(),
|
||||
tflite::MicroOpResolverAnyVersion()) !=
|
||||
kTfLiteOk) {
|
||||
return;
|
||||
}
|
||||
if (micro_op_resolver.AddBuiltin(tflite::BuiltinOperator_RESHAPE,
|
||||
tflite::ops::micro::Register_RESHAPE(),
|
||||
tflite::MicroOpResolverAnyVersion()) !=
|
||||
kTfLiteOk) {
|
||||
return;
|
||||
}
|
||||
@ -105,15 +114,15 @@ void setup() {
|
||||
|
||||
// Get information about the memory area to use for the model's input.
|
||||
model_input = interpreter->input(0);
|
||||
if ((model_input->dims->size != 4) || (model_input->dims->data[0] != 1) ||
|
||||
(model_input->dims->data[1] != kFeatureSliceCount) ||
|
||||
(model_input->dims->data[2] != kFeatureSliceSize) ||
|
||||
(model_input->type != kTfLiteUInt8)) {
|
||||
if ((model_input->dims->size != 2) || (model_input->dims->data[0] != 1) ||
|
||||
(model_input->dims->data[1] !=
|
||||
(kFeatureSliceCount * kFeatureSliceSize)) ||
|
||||
(model_input->type != kTfLiteInt8)) {
|
||||
TF_LITE_REPORT_ERROR(error_reporter,
|
||||
"Bad input tensor parameters in model");
|
||||
return;
|
||||
}
|
||||
model_input_buffer = model_input->data.uint8;
|
||||
model_input_buffer = model_input->data.int8;
|
||||
|
||||
// Prepare to access the audio spectrograms from a microphone or other source
|
||||
// that will provide the inputs to the neural network.
|
||||
|
@ -69,7 +69,7 @@ void SetMicroFeaturesNoiseEstimates(const uint32_t* estimate_presets) {
|
||||
|
||||
TfLiteStatus GenerateMicroFeatures(tflite::ErrorReporter* error_reporter,
|
||||
const int16_t* input, int input_size,
|
||||
int output_size, uint8_t* output,
|
||||
int output_size, int8_t* output,
|
||||
size_t* num_samples_read) {
|
||||
const int16_t* frontend_input;
|
||||
if (g_is_first_time) {
|
||||
@ -84,16 +84,30 @@ TfLiteStatus GenerateMicroFeatures(tflite::ErrorReporter* error_reporter,
|
||||
for (int i = 0; i < frontend_output.size; ++i) {
|
||||
// These scaling values are derived from those used in input_data.py in the
|
||||
// training pipeline.
|
||||
constexpr int32_t value_scale = (10 * 255);
|
||||
constexpr int32_t value_div = (256 * 26);
|
||||
// The feature pipeline outputs 16-bit signed integers in roughly a 0 to 670
|
||||
// range. In training, these are then arbitrarily divided by 25.6 to get
|
||||
// float values in the rough range of 0.0 to 26.0. This scaling is performed
|
||||
// for historical reasons, to match up with the output of other feature
|
||||
// generators.
|
||||
// The process is then further complicated when we quantize the model. This
|
||||
// means we have to scale the 0.0 to 26.0 real values to the -128 to 127
|
||||
// signed integer numbers.
|
||||
// All this means that to get matching values from our integer feature
|
||||
// output into the tensor input, we have to perform:
|
||||
// input = (((feature / 25.6) / 26.0) * 256) - 128
|
||||
// To simplify this and perform it in 32-bit integer math, we rearrange to:
|
||||
// input = (feature * 256) / (25.6 * 26.0) - 128
|
||||
constexpr int32_t value_scale = 256;
|
||||
constexpr int32_t value_div = static_cast<int32_t>((25.6f * 26.0f) + 0.5f);
|
||||
int32_t value =
|
||||
((frontend_output.values[i] * value_scale) + (value_div / 2)) /
|
||||
value_div;
|
||||
if (value < 0) {
|
||||
value = 0;
|
||||
value -= 128;
|
||||
if (value < -128) {
|
||||
value = -128;
|
||||
}
|
||||
if (value > 255) {
|
||||
value = 255;
|
||||
if (value > 127) {
|
||||
value = 127;
|
||||
}
|
||||
output[i] = value;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ TfLiteStatus InitializeMicroFeatures(tflite::ErrorReporter* error_reporter);
|
||||
// feeding into a neural network.
|
||||
TfLiteStatus GenerateMicroFeatures(tflite::ErrorReporter* error_reporter,
|
||||
const int16_t* input, int input_size,
|
||||
int output_size, uint8_t* output,
|
||||
int output_size, int8_t* output,
|
||||
size_t* num_samples_read);
|
||||
|
||||
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_MICRO_FEATURES_GENERATOR_H_
|
||||
|
@ -48,7 +48,7 @@ TF_LITE_MICRO_TEST(TestMicroFeaturesGeneratorYes) {
|
||||
};
|
||||
SetMicroFeaturesNoiseEstimates(yes_estimate_presets);
|
||||
|
||||
uint8_t yes_calculated_data[g_yes_feature_data_slice_size];
|
||||
int8_t yes_calculated_data[g_yes_feature_data_slice_size];
|
||||
size_t num_samples_read;
|
||||
TfLiteStatus yes_status = GenerateMicroFeatures(
|
||||
error_reporter, g_yes_30ms_sample_data, g_yes_30ms_sample_data_size,
|
||||
@ -56,11 +56,12 @@ TF_LITE_MICRO_TEST(TestMicroFeaturesGeneratorYes) {
|
||||
TF_LITE_MICRO_EXPECT_EQ(kTfLiteOk, yes_status);
|
||||
|
||||
for (int i = 0; i < g_yes_feature_data_slice_size; ++i) {
|
||||
TF_LITE_MICRO_EXPECT_EQ(g_yes_feature_data_slice[i],
|
||||
yes_calculated_data[i]);
|
||||
if (g_yes_feature_data_slice[i] != yes_calculated_data[i]) {
|
||||
const int expected = g_yes_feature_data_slice[i];
|
||||
const int actual = yes_calculated_data[i];
|
||||
TF_LITE_MICRO_EXPECT_EQ(expected, actual);
|
||||
if (expected != actual) {
|
||||
TF_LITE_REPORT_ERROR(error_reporter, "Expected value %d but found %d",
|
||||
g_yes_feature_data_slice[i], yes_calculated_data[i]);
|
||||
expected, actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -81,7 +82,7 @@ TF_LITE_MICRO_TEST(TestMicroFeaturesGeneratorNo) {
|
||||
};
|
||||
SetMicroFeaturesNoiseEstimates(no_estimate_presets);
|
||||
|
||||
uint8_t no_calculated_data[g_no_feature_data_slice_size];
|
||||
int8_t no_calculated_data[g_no_feature_data_slice_size];
|
||||
size_t num_samples_read;
|
||||
TfLiteStatus no_status = GenerateMicroFeatures(
|
||||
error_reporter, g_no_30ms_sample_data, g_no_30ms_sample_data_size,
|
||||
@ -89,10 +90,12 @@ TF_LITE_MICRO_TEST(TestMicroFeaturesGeneratorNo) {
|
||||
TF_LITE_MICRO_EXPECT_EQ(kTfLiteOk, no_status);
|
||||
|
||||
for (int i = 0; i < g_no_feature_data_slice_size; ++i) {
|
||||
TF_LITE_MICRO_EXPECT_EQ(g_no_feature_data_slice[i], no_calculated_data[i]);
|
||||
if (g_no_feature_data_slice[i] != no_calculated_data[i]) {
|
||||
const int expected = g_no_feature_data_slice[i];
|
||||
const int actual = no_calculated_data[i];
|
||||
TF_LITE_MICRO_EXPECT_EQ(expected, actual);
|
||||
if (expected != actual) {
|
||||
TF_LITE_REPORT_ERROR(error_reporter, "Expected value %d but found %d",
|
||||
g_no_feature_data_slice[i], no_calculated_data[i]);
|
||||
expected, actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,8 +17,8 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/lite/micro/examples/micro_speech/micro_features/no_feature_data_slice.h"
|
||||
|
||||
const uint8_t g_no_feature_data_slice[g_no_feature_data_slice_size] = {
|
||||
216, 195, 223, 211, 238, 223, 243, 215, 226, 204, 232, 211, 232, 213,
|
||||
240, 218, 235, 214, 238, 205, 207, 173, 149, 201, 215, 200, 230, 213,
|
||||
208, 195, 175, 151, 195, 175, 182, 163, 235, 217, 218, 190,
|
||||
const int8_t g_no_feature_data_slice[g_no_feature_data_slice_size] = {
|
||||
89, 68, 96, 83, 111, 96, 115, 87, 99, 76, 105, 84, 105, 86,
|
||||
113, 91, 108, 87, 110, 78, 80, 46, 22, 74, 88, 72, 103, 86,
|
||||
80, 68, 48, 24, 68, 48, 55, 36, 108, 90, 90, 63,
|
||||
};
|
||||
|
@ -24,6 +24,6 @@ limitations under the License.
|
||||
#include <cstdint>
|
||||
|
||||
constexpr int g_no_feature_data_slice_size = 40;
|
||||
extern const uint8_t g_no_feature_data_slice[];
|
||||
extern const int8_t g_no_feature_data_slice[];
|
||||
|
||||
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_NO_FEATURE_DATA_SLICE_H_
|
||||
|
@ -15,151 +15,174 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/lite/micro/examples/micro_speech/micro_features/no_micro_features_data.h"
|
||||
|
||||
/* File automatically created by
|
||||
* tensorflow/examples/speech_commands/wav_to_features.py \
|
||||
* --sample_rate=16000 \
|
||||
* --clip_duration_ms=1000 \
|
||||
* --window_size_ms=30 \
|
||||
* --window_stride_ms=20 \
|
||||
* --feature_bin_count=40 \
|
||||
* --quantize=1 \
|
||||
* --preprocess="micro" \
|
||||
* --input_wav="speech_commands_test_set_v0.02/no/f9643d42_nohash_4.wav" \
|
||||
* --output_c_file="/tmp/no_micro_features_data.cc" \
|
||||
*/
|
||||
// Golden test values for the expected spectrogram from a "no" sample file
|
||||
// speech_commands_test_set_v0.02/no/f9643d42_nohash_4.wav.
|
||||
|
||||
const int g_no_micro_f9643d42_nohash_4_width = 40;
|
||||
const int g_no_micro_f9643d42_nohash_4_height = 49;
|
||||
const unsigned char g_no_micro_f9643d42_nohash_4_data[] = {
|
||||
230, 205, 191, 203, 202, 181, 180, 194, 205, 187, 183, 197, 203, 198, 196,
|
||||
186, 202, 159, 151, 126, 110, 138, 141, 142, 137, 148, 133, 120, 110, 126,
|
||||
117, 110, 117, 116, 137, 134, 95, 116, 123, 110, 184, 144, 183, 189, 197,
|
||||
172, 188, 164, 194, 179, 175, 174, 182, 173, 184, 174, 200, 145, 154, 148,
|
||||
147, 135, 143, 122, 127, 138, 116, 99, 122, 105, 110, 125, 127, 133, 131,
|
||||
123, 116, 119, 127, 114, 193, 176, 185, 170, 175, 146, 166, 167, 185, 185,
|
||||
185, 183, 195, 185, 176, 178, 197, 155, 137, 144, 164, 132, 153, 132, 138,
|
||||
137, 134, 95, 120, 116, 131, 122, 99, 120, 120, 110, 116, 110, 126, 127,
|
||||
128, 159, 187, 119, 178, 187, 197, 167, 199, 184, 180, 165, 194, 176, 144,
|
||||
134, 187, 136, 142, 134, 145, 132, 145, 105, 119, 123, 125, 116, 125, 102,
|
||||
129, 138, 130, 99, 99, 90, 120, 123, 134, 95, 194, 172, 187, 123, 191,
|
||||
179, 195, 182, 201, 137, 167, 142, 185, 161, 187, 146, 167, 152, 154, 107,
|
||||
152, 112, 134, 144, 117, 116, 105, 85, 105, 105, 99, 90, 123, 112, 112,
|
||||
68, 107, 105, 117, 99, 116, 143, 139, 90, 154, 142, 188, 172, 178, 135,
|
||||
175, 149, 177, 110, 173, 160, 169, 162, 173, 119, 132, 110, 85, 85, 117,
|
||||
129, 117, 112, 117, 51, 112, 95, 139, 102, 105, 90, 128, 119, 112, 99,
|
||||
170, 168, 195, 152, 174, 173, 180, 0, 157, 130, 169, 149, 149, 123, 170,
|
||||
130, 170, 133, 159, 102, 134, 90, 85, 105, 126, 119, 130, 90, 78, 68,
|
||||
127, 120, 95, 51, 122, 110, 112, 78, 116, 95, 180, 135, 179, 146, 179,
|
||||
162, 197, 153, 172, 135, 154, 0, 149, 95, 145, 114, 166, 0, 114, 110,
|
||||
145, 107, 114, 90, 136, 68, 95, 95, 95, 85, 116, 99, 116, 0, 95,
|
||||
68, 102, 51, 102, 78, 185, 157, 138, 158, 180, 117, 173, 142, 145, 117,
|
||||
169, 130, 159, 99, 138, 123, 169, 90, 78, 0, 123, 85, 107, 51, 114,
|
||||
102, 95, 0, 116, 85, 119, 95, 95, 68, 85, 51, 116, 68, 102, 78,
|
||||
167, 105, 164, 163, 178, 126, 164, 154, 154, 51, 177, 120, 156, 85, 134,
|
||||
139, 168, 90, 161, 102, 114, 116, 122, 95, 112, 102, 107, 51, 114, 85,
|
||||
119, 78, 114, 90, 102, 51, 102, 51, 114, 99, 177, 68, 152, 102, 184,
|
||||
166, 179, 129, 177, 129, 180, 110, 158, 105, 139, 0, 145, 85, 148, 102,
|
||||
117, 102, 116, 0, 78, 68, 90, 51, 107, 85, 78, 0, 51, 0, 51,
|
||||
0, 95, 51, 107, 68, 180, 117, 90, 0, 138, 0, 187, 146, 119, 140,
|
||||
164, 90, 136, 0, 131, 51, 159, 99, 141, 138, 116, 51, 90, 51, 90,
|
||||
68, 105, 0, 85, 78, 112, 51, 122, 95, 128, 68, 85, 0, 112, 68,
|
||||
147, 126, 178, 146, 171, 130, 190, 147, 188, 123, 170, 78, 132, 0, 130,
|
||||
125, 159, 95, 102, 0, 110, 0, 95, 85, 120, 68, 78, 51, 99, 51,
|
||||
105, 0, 112, 102, 105, 68, 90, 51, 90, 0, 127, 95, 166, 175, 187,
|
||||
133, 135, 0, 171, 139, 132, 128, 140, 51, 126, 107, 161, 0, 95, 51,
|
||||
119, 0, 114, 0, 95, 110, 116, 51, 112, 0, 90, 0, 116, 51, 68,
|
||||
0, 105, 68, 105, 0, 164, 78, 173, 0, 194, 166, 145, 114, 116, 51,
|
||||
107, 122, 151, 0, 156, 102, 148, 51, 122, 95, 129, 0, 85, 0, 127,
|
||||
78, 90, 0, 78, 0, 95, 0, 110, 0, 68, 119, 120, 68, 68, 0,
|
||||
122, 99, 147, 127, 200, 167, 85, 114, 161, 85, 161, 125, 143, 99, 156,
|
||||
85, 147, 68, 99, 0, 107, 102, 132, 51, 112, 68, 95, 78, 99, 0,
|
||||
68, 0, 51, 0, 90, 78, 128, 51, 95, 0, 166, 136, 174, 138, 189,
|
||||
144, 130, 129, 138, 134, 132, 120, 134, 0, 51, 78, 147, 51, 51, 0,
|
||||
51, 0, 78, 0, 68, 68, 95, 78, 90, 0, 0, 0, 68, 0, 90,
|
||||
68, 110, 0, 95, 51, 165, 151, 157, 0, 0, 0, 112, 0, 112, 95,
|
||||
149, 107, 119, 68, 126, 68, 138, 0, 78, 0, 78, 0, 99, 51, 112,
|
||||
0, 102, 0, 78, 51, 85, 0, 0, 0, 78, 0, 95, 0, 95, 78,
|
||||
105, 0, 152, 0, 0, 51, 132, 105, 159, 0, 129, 102, 114, 0, 138,
|
||||
51, 123, 0, 129, 78, 119, 51, 51, 51, 105, 0, 78, 85, 95, 0,
|
||||
85, 0, 0, 0, 85, 0, 78, 0, 0, 0, 172, 142, 141, 0, 137,
|
||||
0, 148, 128, 157, 120, 146, 120, 120, 0, 95, 78, 141, 68, 68, 0,
|
||||
68, 0, 90, 0, 85, 0, 107, 0, 78, 0, 85, 51, 102, 0, 68,
|
||||
78, 68, 0, 51, 0, 125, 0, 141, 51, 102, 138, 175, 51, 120, 51,
|
||||
173, 85, 116, 141, 164, 68, 150, 123, 133, 51, 114, 0, 117, 68, 150,
|
||||
51, 116, 68, 78, 0, 68, 0, 68, 0, 85, 0, 78, 0, 51, 78,
|
||||
155, 90, 161, 0, 132, 99, 123, 78, 107, 0, 134, 90, 95, 0, 78,
|
||||
0, 162, 143, 85, 0, 107, 78, 125, 90, 90, 51, 51, 0, 85, 0,
|
||||
0, 0, 132, 102, 102, 154, 128, 0, 99, 68, 162, 102, 151, 0, 99,
|
||||
51, 147, 141, 156, 0, 112, 120, 158, 127, 145, 139, 187, 171, 135, 138,
|
||||
146, 0, 95, 68, 127, 0, 85, 0, 105, 0, 0, 0, 187, 170, 162,
|
||||
188, 165, 51, 51, 78, 243, 215, 225, 196, 205, 181, 205, 168, 176, 134,
|
||||
157, 110, 126, 114, 133, 139, 193, 163, 159, 116, 160, 126, 122, 127, 171,
|
||||
99, 114, 68, 123, 85, 90, 0, 157, 146, 166, 179, 136, 0, 116, 90,
|
||||
242, 219, 240, 204, 216, 164, 188, 171, 176, 164, 154, 158, 190, 157, 190,
|
||||
141, 182, 177, 169, 128, 172, 145, 105, 129, 157, 90, 78, 51, 119, 68,
|
||||
137, 68, 116, 78, 141, 132, 151, 122, 156, 140, 234, 206, 229, 201, 216,
|
||||
174, 191, 144, 162, 85, 122, 157, 194, 167, 204, 149, 180, 166, 166, 139,
|
||||
122, 133, 156, 126, 145, 85, 128, 0, 99, 51, 145, 0, 126, 51, 166,
|
||||
162, 166, 162, 177, 157, 228, 198, 221, 197, 214, 177, 173, 166, 173, 139,
|
||||
185, 191, 202, 163, 205, 172, 206, 189, 135, 68, 166, 134, 149, 134, 135,
|
||||
90, 127, 107, 175, 90, 136, 117, 135, 140, 172, 167, 166, 149, 177, 152,
|
||||
221, 191, 215, 194, 211, 0, 156, 147, 182, 178, 208, 163, 190, 157, 208,
|
||||
200, 195, 164, 179, 154, 181, 150, 143, 99, 132, 137, 185, 143, 163, 85,
|
||||
51, 107, 132, 134, 164, 127, 167, 159, 175, 141, 216, 195, 223, 211, 238,
|
||||
223, 243, 215, 226, 204, 232, 211, 232, 213, 240, 218, 235, 214, 238, 205,
|
||||
207, 173, 149, 201, 215, 200, 230, 213, 208, 195, 175, 151, 195, 175, 182,
|
||||
163, 235, 217, 218, 190, 211, 191, 215, 191, 217, 220, 241, 215, 229, 206,
|
||||
236, 210, 227, 216, 236, 188, 183, 149, 202, 189, 208, 172, 191, 201, 220,
|
||||
193, 221, 207, 216, 208, 201, 131, 170, 187, 229, 197, 211, 194, 226, 201,
|
||||
205, 184, 206, 177, 221, 210, 226, 184, 204, 197, 218, 198, 212, 209, 213,
|
||||
141, 172, 110, 175, 167, 180, 156, 213, 188, 192, 179, 213, 205, 204, 174,
|
||||
200, 147, 162, 181, 203, 167, 198, 187, 210, 164, 196, 169, 189, 168, 224,
|
||||
198, 213, 204, 198, 195, 230, 211, 221, 197, 208, 0, 0, 0, 85, 90,
|
||||
167, 130, 175, 173, 203, 164, 193, 144, 170, 145, 185, 148, 154, 139, 198,
|
||||
159, 180, 171, 216, 174, 178, 161, 166, 136, 216, 184, 215, 197, 199, 190,
|
||||
228, 195, 208, 51, 117, 0, 0, 0, 0, 0, 140, 51, 135, 154, 188,
|
||||
155, 168, 0, 90, 0, 156, 85, 110, 0, 174, 90, 172, 154, 179, 99,
|
||||
142, 166, 179, 157, 177, 95, 192, 142, 204, 198, 217, 147, 173, 0, 112,
|
||||
0, 0, 0, 0, 0, 0, 0, 110, 0, 107, 0, 160, 0, 148, 95,
|
||||
172, 0, 0, 0, 116, 0, 122, 114, 170, 0, 0, 0, 0, 0, 179,
|
||||
110, 196, 85, 205, 183, 169, 0, 99, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 141, 0, 112, 0, 0, 0, 134, 0, 0, 0, 0,
|
||||
0, 0, 0, 139, 0, 0, 0, 0, 112, 186, 78, 163, 0, 169, 128,
|
||||
174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95,
|
||||
0, 105, 0, 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 95, 0,
|
||||
0, 0, 0, 0, 0, 0, 119, 0, 164, 78, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 68,
|
||||
117, 0, 0, 0, 0, 0, 0, 0, 148, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
|
||||
0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const signed char g_no_micro_f9643d42_nohash_4_data[] = {
|
||||
103, 78, 64, 76, 75, 54, 53, 67, 77, 60, 56, 70,
|
||||
76, 71, 68, 58, 74, 32, 23, -2, -18, 11, 13, 15,
|
||||
9, 20, 5, -7, -18, -2, -10, -18, -10, -12, 9, 7,
|
||||
-33, -12, -4, -18, 57, 17, 55, 62, 70, 45, 61, 37,
|
||||
67, 52, 48, 47, 55, 46, 57, 47, 73, 17, 27, 20,
|
||||
19, 8, 15, -6, -1, 10, -12, -29, -6, -23, -18, -3,
|
||||
-1, 5, 3, -4, -12, -8, -1, -14, 65, 48, 58, 43,
|
||||
48, 19, 39, 39, 57, 57, 58, 55, 67, 58, 49, 50,
|
||||
70, 27, 9, 16, 37, 4, 25, 4, 11, 9, 7, -33,
|
||||
-7, -12, 3, -6, -29, -7, -7, -18, -12, -18, -2, -1,
|
||||
0, 31, 60, -8, 51, 59, 70, 40, 71, 57, 52, 38,
|
||||
66, 48, 17, 6, 59, 8, 15, 7, 18, 4, 18, -23,
|
||||
-8, -4, -3, -12, -3, -26, 1, 10, 2, -29, -29, -37,
|
||||
-7, -4, 6, -33, 67, 44, 59, -4, 64, 51, 68, 55,
|
||||
74, 9, 40, 15, 57, 33, 60, 18, 40, 25, 27, -20,
|
||||
25, -16, 6, 17, -10, -12, -23, -43, -23, -23, -29, -37,
|
||||
-4, -16, -16, -60, -20, -23, -10, -29, -12, 15, 12, -37,
|
||||
27, 15, 61, 44, 50, 8, 48, 22, 49, -18, 46, 33,
|
||||
42, 34, 46, -8, 4, -18, -43, -43, -10, 1, -10, -16,
|
||||
-10, -77, -16, -33, 11, -26, -23, -37, 0, -8, -16, -29,
|
||||
42, 40, 68, 24, 47, 46, 53, -128, 30, 2, 42, 21,
|
||||
21, -4, 43, 2, 43, 5, 32, -26, 7, -37, -43, -23,
|
||||
-2, -8, 2, -37, -50, -60, -1, -7, -33, -77, -6, -18,
|
||||
-16, -50, -12, -33, 53, 8, 52, 18, 51, 35, 69, 26,
|
||||
44, 8, 27, -128, 21, -33, 17, -14, 38, -128, -14, -18,
|
||||
17, -20, -14, -37, 8, -60, -33, -33, -33, -43, -12, -29,
|
||||
-12, -128, -33, -60, -26, -77, -26, -50, 57, 29, 11, 30,
|
||||
53, -10, 45, 15, 18, -10, 42, 2, 31, -29, 10, -4,
|
||||
42, -37, -50, -128, -4, -43, -20, -77, -14, -26, -33, -128,
|
||||
-12, -43, -8, -33, -33, -60, -43, -77, -12, -60, -26, -50,
|
||||
40, -23, 36, 35, 50, -2, 37, 27, 26, -77, 49, -7,
|
||||
28, -43, 6, 11, 41, -37, 33, -26, -14, -12, -6, -33,
|
||||
-16, -26, -20, -77, -14, -43, -8, -50, -14, -37, -26, -77,
|
||||
-26, -77, -14, -29, 50, -60, 25, -26, 57, 38, 51, 1,
|
||||
50, 1, 53, -18, 30, -23, 11, -128, 18, -43, 20, -26,
|
||||
-10, -26, -12, -128, -50, -60, -37, -77, -20, -43, -50, -128,
|
||||
-77, -128, -77, -128, -33, -77, -20, -60, 53, -10, -37, -128,
|
||||
10, -128, 60, 18, -8, 13, 37, -37, 8, -128, 3, -77,
|
||||
32, -29, 14, 10, -12, -77, -37, -77, -37, -60, -23, -128,
|
||||
-43, -50, -16, -77, -6, -33, 0, -60, -43, -128, -16, -60,
|
||||
20, -2, 51, 19, 43, 2, 63, 20, 60, -4, 42, -50,
|
||||
4, -128, 2, -3, 32, -33, -26, -128, -18, -128, -33, -43,
|
||||
-7, -60, -50, -77, -29, -77, -23, -128, -16, -26, -23, -60,
|
||||
-37, -77, -37, -128, -1, -33, 39, 48, 60, 5, 8, -128,
|
||||
44, 11, 4, 0, 13, -77, -2, -20, 33, -128, -33, -77,
|
||||
-8, -128, -14, -128, -33, -18, -12, -77, -16, -128, -37, -128,
|
||||
-12, -77, -60, -128, -23, -60, -23, -128, 36, -50, 46, -128,
|
||||
66, 39, 18, -14, -12, -77, -20, -6, 24, -128, 28, -26,
|
||||
21, -77, -6, -33, 1, -128, -43, -128, -1, -50, -37, -128,
|
||||
-50, -128, -33, -128, -18, -128, -60, -8, -7, -60, -60, -128,
|
||||
-6, -29, 20, -1, 73, 40, -43, -14, 33, -43, 33, -3,
|
||||
15, -29, 29, -43, 20, -60, -29, -128, -20, -26, 4, -77,
|
||||
-16, -60, -33, -50, -29, -128, -60, -128, -77, -128, -37, -50,
|
||||
0, -77, -33, -128, 39, 8, 47, 10, 62, 16, 2, 1,
|
||||
10, 7, 4, -7, 6, -128, -77, -50, 19, -77, -77, -128,
|
||||
-77, -128, -50, -128, -60, -60, -33, -50, -37, -128, -128, -128,
|
||||
-60, -128, -37, -60, -18, -128, -33, -77, 37, 23, 29, -128,
|
||||
-128, -128, -16, -128, -16, -33, 21, -20, -8, -60, -2, -60,
|
||||
11, -128, -50, -128, -50, -128, -29, -77, -16, -128, -26, -128,
|
||||
-50, -77, -43, -128, -128, -128, -50, -128, -33, -128, -33, -50,
|
||||
-23, -128, 24, -128, -128, -77, 4, -23, 32, -128, 1, -26,
|
||||
-14, -128, 10, -77, -4, -128, 1, -50, -8, -77, -77, -77,
|
||||
-23, -128, -50, -43, -33, -128, -43, -128, -128, -128, -43, -128,
|
||||
-50, -128, -128, -128, 44, 15, 14, -128, 9, -128, 21, 0,
|
||||
29, -7, 18, -7, -7, -128, -33, -50, 14, -60, -60, -128,
|
||||
-60, -128, -37, -128, -43, -128, -20, -128, -50, -128, -43, -77,
|
||||
-26, -128, -60, -50, -60, -128, -77, -128, -3, -128, 14, -77,
|
||||
-26, 11, 47, -77, -7, -77, 45, -43, -12, 14, 37, -60,
|
||||
22, -4, 5, -77, -14, -128, -10, -60, 22, -77, -12, -60,
|
||||
-50, -128, -60, -128, -60, -128, -43, -128, -50, -128, -77, -50,
|
||||
27, -37, 33, -128, 4, -29, -4, -50, -20, -128, 6, -37,
|
||||
-33, -128, -50, -128, 34, 15, -43, -128, -20, -50, -3, -37,
|
||||
-37, -77, -77, -128, -43, -128, -128, -128, 4, -26, -26, 27,
|
||||
0, -128, -29, -60, 35, -26, 23, -128, -29, -77, 19, 14,
|
||||
28, -128, -16, -7, 31, -1, 17, 11, 60, 44, 8, 11,
|
||||
18, -128, -33, -60, -1, -128, -43, -128, -23, -128, -128, -128,
|
||||
59, 43, 35, 61, 37, -77, -77, -50, 116, 88, 98, 69,
|
||||
78, 53, 78, 40, 48, 7, 29, -18, -2, -14, 5, 12,
|
||||
65, 35, 31, -12, 33, -2, -6, -1, 44, -29, -14, -60,
|
||||
-4, -43, -37, -128, 29, 18, 38, 51, 8, -128, -12, -37,
|
||||
115, 91, 113, 77, 89, 36, 60, 44, 49, 36, 27, 31,
|
||||
63, 30, 62, 14, 55, 49, 42, 0, 45, 17, -23, 1,
|
||||
30, -37, -50, -77, -8, -60, 9, -60, -12, -50, 13, 4,
|
||||
23, -6, 28, 13, 107, 78, 101, 73, 89, 46, 63, 17,
|
||||
34, -43, -6, 30, 67, 40, 77, 21, 53, 39, 38, 12,
|
||||
-6, 5, 28, -2, 18, -43, 0, -128, -29, -77, 18, -128,
|
||||
-2, -77, 39, 35, 38, 35, 50, 29, 100, 70, 94, 69,
|
||||
86, 50, 45, 38, 45, 12, 58, 64, 74, 36, 77, 45,
|
||||
78, 62, 8, -60, 38, 6, 21, 7, 8, -37, -1, -20,
|
||||
48, -37, 8, -10, 8, 13, 45, 39, 38, 22, 49, 25,
|
||||
94, 63, 87, 66, 84, -128, 29, 20, 55, 51, 80, 36,
|
||||
62, 30, 81, 72, 68, 37, 51, 27, 54, 22, 16, -29,
|
||||
4, 9, 57, 15, 35, -43, -77, -20, 4, 6, 37, -1,
|
||||
40, 31, 47, 14, 89, 68, 96, 83, 111, 96, 115, 87,
|
||||
99, 76, 105, 84, 105, 86, 113, 91, 108, 87, 110, 78,
|
||||
80, 46, 22, 74, 88, 72, 103, 86, 80, 68, 48, 24,
|
||||
68, 48, 55, 36, 108, 90, 90, 63, 83, 63, 87, 64,
|
||||
90, 92, 113, 88, 102, 79, 109, 83, 100, 89, 109, 60,
|
||||
56, 21, 75, 62, 81, 45, 63, 73, 93, 65, 94, 80,
|
||||
89, 81, 73, 3, 43, 60, 102, 70, 84, 67, 99, 74,
|
||||
78, 57, 79, 50, 93, 82, 98, 56, 77, 70, 91, 71,
|
||||
85, 82, 86, 13, 45, -18, 48, 40, 53, 28, 85, 60,
|
||||
65, 52, 86, 78, 76, 46, 73, 19, 35, 54, 75, 40,
|
||||
71, 60, 82, 37, 69, 42, 62, 40, 96, 70, 85, 77,
|
||||
70, 68, 103, 84, 94, 69, 81, -128, -128, -128, -43, -37,
|
||||
40, 2, 48, 45, 76, 37, 65, 16, 43, 18, 58, 20,
|
||||
27, 12, 71, 31, 53, 44, 88, 47, 50, 33, 39, 8,
|
||||
89, 57, 88, 69, 72, 63, 100, 68, 81, -77, -10, -128,
|
||||
-128, -128, -128, -128, 13, -77, 8, 27, 60, 28, 41, -128,
|
||||
-37, -128, 28, -43, -18, -128, 47, -37, 45, 27, 51, -29,
|
||||
15, 39, 52, 30, 49, -33, 65, 15, 76, 71, 90, 19,
|
||||
46, -128, -16, -128, -128, -128, -128, -128, -128, -128, -18, -128,
|
||||
-20, -128, 32, -128, 21, -33, 45, -128, -128, -128, -12, -128,
|
||||
-6, -14, 43, -128, -128, -128, -128, -128, 52, -18, 69, -43,
|
||||
78, 55, 42, -128, -29, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, 14, -128, -16, -128, -128, -128, 7, -128,
|
||||
-128, -128, -128, -128, -128, -128, 12, -128, -128, -128, -128, -16,
|
||||
59, -50, 35, -128, 42, 0, 47, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -33, -128, -23, -128,
|
||||
-128, -128, -23, -128, -128, -128, -128, -128, -128, -128, -33, -128,
|
||||
-128, -128, -128, -128, -128, -128, -8, -128, 36, -50, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -37, -128, -128, -60, -10, -128, -128, -128, -128, -128,
|
||||
-128, -128, 21, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-12, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -77, -128, -128, -128, -29, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-29, -128, -128, -128, -128, -128, -128, -128, -128, -128, -50, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128,
|
||||
};
|
||||
|
@ -18,6 +18,6 @@ limitations under the License.
|
||||
|
||||
extern const int g_no_micro_f9643d42_nohash_4_width;
|
||||
extern const int g_no_micro_f9643d42_nohash_4_height;
|
||||
extern const unsigned char g_no_micro_f9643d42_nohash_4_data[];
|
||||
extern const signed char g_no_micro_f9643d42_nohash_4_data[];
|
||||
|
||||
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_NO_MICRO_FEATURES_DATA_H_
|
||||
|
@ -17,8 +17,8 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/lite/micro/examples/micro_speech/micro_features/yes_feature_data_slice.h"
|
||||
|
||||
const uint8_t g_yes_feature_data_slice[g_yes_feature_data_slice_size] = {
|
||||
214, 215, 236, 202, 235, 203, 225, 191, 203, 188, 199, 194, 212, 127,
|
||||
51, 0, 174, 188, 219, 196, 228, 221, 240, 207, 235, 220, 241, 219,
|
||||
237, 207, 212, 142, 95, 0, 139, 78, 162, 177, 197, 183,
|
||||
const int8_t g_yes_feature_data_slice[g_yes_feature_data_slice_size] = {
|
||||
86, 88, 108, 75, 108, 76, 98, 64, 75, 61, 71, 66, 85, -1,
|
||||
-77, -128, 46, 61, 92, 69, 100, 93, 113, 80, 108, 93, 113, 91,
|
||||
110, 80, 85, 15, -33, -128, 12, -50, 34, 50, 70, 55,
|
||||
};
|
||||
|
@ -24,6 +24,6 @@ limitations under the License.
|
||||
#include <cstdint>
|
||||
|
||||
constexpr int g_yes_feature_data_slice_size = 40;
|
||||
extern const uint8_t g_yes_feature_data_slice[];
|
||||
extern const int8_t g_yes_feature_data_slice[];
|
||||
|
||||
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_YES_FEATURE_DATA_SLICE_H_
|
||||
|
@ -15,151 +15,174 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/lite/micro/examples/micro_speech/micro_features/yes_micro_features_data.h"
|
||||
|
||||
/* File automatically created by
|
||||
* tensorflow/examples/speech_commands/wav_to_features.py \
|
||||
* --sample_rate=16000 \
|
||||
* --clip_duration_ms=1000 \
|
||||
* --window_size_ms=30 \
|
||||
* --window_stride_ms=20 \
|
||||
* --feature_bin_count=40 \
|
||||
* --quantize=1 \
|
||||
* --preprocess="micro" \
|
||||
* --input_wav="speech_commands_test_set_v0.02/yes/f2e59fea_nohash_1.wav" \
|
||||
* --output_c_file="yes_micro_features_data.cc" \
|
||||
*/
|
||||
// Golden test values for the expected spectrogram from a "yes" sample file
|
||||
// speech_commands_test_set_v0.02/yes/f2e59fea_nohash_1.wav.
|
||||
|
||||
const int g_yes_micro_f2e59fea_nohash_1_width = 40;
|
||||
const int g_yes_micro_f2e59fea_nohash_1_height = 49;
|
||||
const unsigned char g_yes_micro_f2e59fea_nohash_1_data[] = {
|
||||
244, 226, 245, 223, 234, 213, 228, 208, 194, 110, 95, 116, 102, 0, 137,
|
||||
161, 183, 173, 137, 116, 133, 157, 151, 156, 128, 110, 128, 0, 68, 78,
|
||||
78, 90, 68, 68, 78, 102, 95, 78, 95, 78, 210, 188, 209, 183, 204,
|
||||
188, 201, 191, 166, 119, 90, 107, 110, 107, 175, 157, 179, 168, 182, 145,
|
||||
152, 164, 171, 165, 136, 143, 122, 68, 0, 78, 90, 90, 110, 90, 102,
|
||||
99, 90, 68, 78, 68, 223, 186, 179, 123, 182, 110, 196, 171, 159, 110,
|
||||
102, 95, 90, 99, 160, 134, 125, 136, 153, 152, 164, 134, 164, 151, 141,
|
||||
136, 99, 90, 90, 90, 78, 78, 102, 119, 102, 90, 110, 90, 68, 51,
|
||||
177, 175, 211, 172, 183, 0, 95, 68, 129, 102, 68, 85, 114, 105, 110,
|
||||
85, 102, 95, 140, 51, 85, 51, 95, 90, 143, 116, 90, 78, 78, 51,
|
||||
107, 85, 68, 0, 68, 51, 90, 51, 68, 0, 164, 117, 193, 120, 156,
|
||||
0, 138, 51, 90, 0, 51, 0, 51, 85, 0, 0, 51, 0, 0, 0,
|
||||
0, 0, 114, 0, 85, 78, 90, 51, 0, 0, 51, 85, 99, 85, 107,
|
||||
68, 90, 85, 78, 0, 51, 0, 110, 0, 68, 0, 0, 0, 51, 0,
|
||||
51, 0, 0, 0, 68, 90, 107, 0, 68, 0, 0, 0, 68, 0, 51,
|
||||
68, 0, 78, 68, 0, 51, 0, 78, 68, 90, 68, 78, 51, 51, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0,
|
||||
0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 68,
|
||||
0, 0, 78, 0, 78, 0, 78, 0, 51, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 51, 0, 51, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 51,
|
||||
0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
|
||||
0, 0, 0, 0, 51, 78, 0, 0, 51, 51, 0, 0, 0, 78, 0,
|
||||
213, 170, 192, 180, 196, 188, 173, 131, 173, 116, 137, 105, 159, 127, 0,
|
||||
0, 0, 0, 127, 164, 165, 161, 170, 164, 185, 197, 195, 167, 134, 138,
|
||||
159, 134, 136, 105, 51, 0, 99, 0, 51, 0, 228, 215, 229, 218, 237,
|
||||
215, 228, 210, 237, 222, 239, 211, 208, 211, 234, 218, 220, 209, 225, 219,
|
||||
235, 222, 245, 225, 245, 224, 243, 223, 241, 218, 237, 224, 234, 213, 221,
|
||||
193, 197, 164, 157, 128, 227, 188, 232, 196, 220, 220, 240, 219, 234, 213,
|
||||
234, 211, 231, 218, 233, 213, 239, 215, 228, 207, 229, 206, 224, 208, 226,
|
||||
207, 232, 210, 225, 208, 230, 199, 227, 206, 210, 205, 218, 174, 178, 141,
|
||||
235, 208, 220, 206, 225, 203, 233, 203, 225, 167, 205, 199, 208, 190, 221,
|
||||
204, 223, 207, 225, 188, 225, 197, 215, 188, 199, 183, 225, 195, 224, 200,
|
||||
216, 178, 208, 188, 215, 202, 214, 183, 176, 140, 198, 150, 211, 194, 203,
|
||||
120, 175, 188, 204, 189, 219, 192, 223, 202, 216, 186, 203, 185, 210, 182,
|
||||
214, 183, 204, 170, 204, 125, 184, 187, 206, 185, 198, 182, 210, 161, 202,
|
||||
198, 218, 173, 145, 120, 188, 183, 205, 168, 200, 170, 210, 177, 187, 190,
|
||||
209, 193, 193, 166, 210, 162, 175, 119, 174, 147, 182, 161, 181, 134, 176,
|
||||
143, 187, 165, 186, 149, 185, 141, 192, 181, 202, 123, 170, 143, 144, 78,
|
||||
149, 0, 208, 182, 170, 78, 170, 0, 117, 51, 156, 99, 195, 170, 200,
|
||||
130, 152, 68, 175, 141, 173, 134, 194, 132, 189, 164, 198, 134, 173, 117,
|
||||
171, 149, 183, 181, 185, 99, 153, 117, 125, 0, 166, 0, 173, 117, 144,
|
||||
0, 117, 102, 188, 120, 193, 166, 197, 68, 163, 119, 169, 99, 134, 0,
|
||||
162, 0, 164, 68, 171, 116, 126, 0, 120, 68, 68, 0, 105, 0, 159,
|
||||
95, 150, 51, 90, 85, 0, 0, 131, 0, 105, 0, 145, 51, 170, 51,
|
||||
120, 0, 107, 0, 145, 85, 160, 0, 85, 0, 0, 51, 149, 0, 78,
|
||||
0, 0, 0, 0, 0, 0, 0, 90, 0, 112, 0, 78, 102, 122, 0,
|
||||
0, 0, 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112,
|
||||
0, 164, 120, 143, 0, 0, 0, 0, 0, 51, 0, 90, 0, 78, 0,
|
||||
0, 0, 0, 0, 110, 0, 139, 0, 112, 51, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 0, 51, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 127, 110, 133, 0, 167, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, 190,
|
||||
194, 202, 0, 197, 187, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
214, 213, 223, 203, 218, 189, 200, 122, 78, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 191, 210, 231, 197, 226, 217, 238, 216, 236, 207,
|
||||
199, 0, 0, 0, 0, 0, 107, 122, 155, 160, 214, 215, 236, 202, 235,
|
||||
203, 225, 191, 203, 188, 199, 194, 212, 127, 51, 0, 174, 188, 219, 196,
|
||||
228, 221, 240, 207, 235, 220, 241, 219, 237, 207, 212, 142, 95, 0, 139,
|
||||
78, 162, 177, 197, 183, 211, 199, 235, 208, 238, 215, 227, 207, 211, 201,
|
||||
224, 213, 226, 192, 213, 170, 223, 205, 234, 221, 245, 225, 242, 220, 245,
|
||||
221, 239, 221, 238, 213, 226, 180, 159, 112, 176, 159, 208, 202, 213, 191,
|
||||
205, 191, 225, 197, 238, 219, 224, 201, 227, 200, 221, 201, 225, 203, 212,
|
||||
195, 229, 210, 228, 210, 239, 216, 226, 212, 233, 205, 225, 200, 229, 207,
|
||||
222, 151, 147, 119, 179, 185, 230, 218, 223, 192, 202, 136, 205, 177, 223,
|
||||
204, 228, 215, 232, 209, 221, 189, 221, 205, 209, 200, 226, 209, 229, 205,
|
||||
235, 192, 209, 198, 228, 190, 206, 185, 207, 187, 214, 175, 177, 184, 220,
|
||||
195, 214, 207, 230, 184, 205, 159, 208, 184, 189, 169, 224, 213, 219, 199,
|
||||
229, 203, 216, 205, 222, 204, 224, 206, 231, 208, 231, 176, 197, 184, 216,
|
||||
193, 211, 139, 212, 195, 231, 164, 166, 195, 217, 182, 208, 190, 217, 179,
|
||||
205, 68, 182, 119, 195, 168, 182, 136, 204, 179, 193, 158, 182, 140, 188,
|
||||
154, 197, 169, 190, 99, 184, 0, 125, 0, 131, 0, 99, 68, 179, 85,
|
||||
190, 184, 213, 203, 223, 202, 212, 190, 209, 138, 178, 0, 159, 51, 128,
|
||||
51, 105, 0, 139, 51, 179, 125, 185, 114, 171, 128, 175, 132, 181, 174,
|
||||
155, 0, 0, 0, 90, 0, 125, 0, 176, 188, 227, 217, 244, 215, 234,
|
||||
221, 239, 192, 224, 210, 0, 0, 134, 0, 51, 0, 105, 0, 105, 0,
|
||||
143, 90, 192, 119, 175, 147, 141, 51, 184, 110, 85, 0, 0, 0, 0,
|
||||
0, 0, 0, 151, 139, 201, 203, 232, 203, 226, 208, 236, 206, 230, 212,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, 119,
|
||||
0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 133,
|
||||
200, 180, 220, 197, 228, 201, 221, 184, 213, 193, 110, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 78, 0, 164, 0, 0, 0, 0, 0, 107, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 164, 202, 182, 224,
|
||||
197, 211, 179, 212, 193, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
85, 0, 150, 0, 85, 0, 95, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 102, 90, 193, 160, 203, 164, 200, 178, 205, 174,
|
||||
116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 114, 123, 0, 114,
|
||||
0, 145, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
102, 68, 199, 170, 195, 180, 208, 176, 200, 164, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 102, 172, 110, 186,
|
||||
167, 185, 147, 189, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 177, 0, 158, 136, 197, 155, 189, 166,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
85, 0, 155, 90, 175, 117, 175, 138, 202, 165, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 139,
|
||||
0, 120, 68, 51, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 78, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
const signed char g_yes_micro_f2e59fea_nohash_1_data[] = {
|
||||
116, 98, 118, 95, 106, 85, 101, 81, 67, -18, -33, -12,
|
||||
-26, -128, 9, 34, 56, 45, 9, -12, 5, 30, 23, 28,
|
||||
0, -18, 0, -128, -60, -50, -50, -37, -60, -60, -50, -26,
|
||||
-33, -50, -33, -50, 83, 61, 81, 55, 76, 61, 73, 64,
|
||||
38, -8, -37, -20, -18, -20, 48, 29, 52, 41, 55, 18,
|
||||
25, 37, 44, 37, 8, 15, -6, -60, -128, -50, -37, -37,
|
||||
-18, -37, -26, -29, -37, -60, -50, -60, 95, 59, 52, -4,
|
||||
54, -18, 68, 43, 31, -18, -26, -33, -37, -29, 33, 7,
|
||||
-3, 8, 26, 24, 36, 6, 36, 23, 14, 8, -29, -37,
|
||||
-37, -37, -50, -50, -26, -8, -26, -37, -18, -37, -60, -77,
|
||||
50, 48, 83, 44, 56, -128, -33, -60, 1, -26, -60, -43,
|
||||
-14, -23, -18, -43, -26, -33, 13, -77, -43, -77, -33, -37,
|
||||
16, -12, -37, -50, -50, -77, -20, -43, -60, -128, -60, -77,
|
||||
-37, -77, -60, -128, 37, -10, 65, -7, 28, -128, 10, -77,
|
||||
-37, -128, -77, -128, -77, -43, -128, -128, -77, -128, -128, -128,
|
||||
-128, -128, -14, -128, -43, -50, -37, -77, -128, -128, -77, -43,
|
||||
-29, -43, -20, -60, -37, -43, -50, -128, -77, -128, -18, -128,
|
||||
-60, -128, -128, -128, -77, -128, -77, -128, -128, -128, -60, -37,
|
||||
-20, -128, -60, -128, -128, -128, -60, -128, -77, -60, -128, -50,
|
||||
-60, -128, -77, -128, -50, -60, -37, -60, -50, -77, -77, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -37, -128,
|
||||
-128, -128, -128, -128, -77, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -77, -60, -128, -128, -50, -128, -50, -128,
|
||||
-50, -128, -77, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -77, -128, -77, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-77, -128, -77, -128, -77, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -77, -128, -128, -128,
|
||||
-128, -77, -50, -128, -128, -77, -77, -128, -128, -128, -50, -128,
|
||||
85, 43, 65, 53, 69, 60, 45, 3, 46, -12, 9, -23,
|
||||
32, -1, -128, -128, -128, -128, -1, 37, 38, 33, 43, 36,
|
||||
58, 70, 68, 39, 6, 10, 32, 6, 8, -23, -77, -128,
|
||||
-29, -128, -77, -128, 101, 87, 102, 91, 110, 88, 101, 83,
|
||||
110, 95, 111, 83, 81, 84, 106, 90, 93, 82, 98, 91,
|
||||
108, 95, 118, 97, 118, 97, 116, 96, 113, 90, 110, 96,
|
||||
107, 85, 94, 66, 69, 36, 29, 0, 100, 60, 105, 68,
|
||||
92, 93, 113, 92, 107, 85, 107, 83, 104, 91, 105, 85,
|
||||
112, 88, 101, 80, 101, 79, 96, 80, 98, 80, 105, 83,
|
||||
98, 81, 103, 71, 100, 79, 83, 78, 91, 47, 50, 13,
|
||||
108, 81, 93, 78, 98, 76, 105, 76, 98, 40, 77, 72,
|
||||
81, 62, 93, 77, 96, 80, 98, 61, 97, 69, 88, 61,
|
||||
71, 56, 98, 68, 97, 72, 89, 51, 81, 61, 88, 75,
|
||||
86, 56, 48, 13, 71, 22, 84, 66, 76, -7, 48, 61,
|
||||
77, 62, 91, 65, 95, 74, 88, 59, 75, 58, 83, 55,
|
||||
87, 55, 76, 43, 76, -3, 56, 60, 79, 57, 71, 54,
|
||||
82, 33, 74, 71, 91, 45, 18, -7, 61, 56, 77, 41,
|
||||
73, 42, 82, 49, 59, 63, 82, 65, 66, 38, 83, 34,
|
||||
48, -8, 46, 20, 54, 33, 54, 6, 48, 16, 60, 37,
|
||||
58, 22, 58, 14, 65, 53, 75, -4, 42, 16, 16, -50,
|
||||
22, -128, 80, 54, 43, -50, 42, -128, -10, -77, 28, -29,
|
||||
68, 43, 73, 2, 25, -60, 47, 14, 45, 7, 66, 4,
|
||||
62, 37, 71, 7, 46, -10, 44, 22, 55, 53, 57, -29,
|
||||
26, -10, -3, -128, 38, -128, 46, -10, 16, -128, -10, -26,
|
||||
60, -7, 65, 38, 70, -60, 35, -8, 42, -29, 6, -128,
|
||||
34, -128, 36, -60, 44, -12, -2, -128, -7, -60, -60, -128,
|
||||
-23, -128, 31, -33, 22, -77, -37, -43, -128, -128, 3, -128,
|
||||
-23, -128, 17, -77, 43, -77, -7, -128, -20, -128, 17, -43,
|
||||
32, -128, -43, -128, -128, -77, 21, -128, -50, -128, -128, -128,
|
||||
-128, -128, -128, -128, -37, -128, -16, -128, -50, -26, -6, -128,
|
||||
-128, -128, -128, -128, -23, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -16, -128, 36, -7, 16, -128, -128, -128, -128, -128,
|
||||
-77, -128, -37, -128, -50, -128, -128, -128, -128, -128, -18, -128,
|
||||
11, -128, -16, -77, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -26, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -20, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -50, -128, -77, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -77, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -1, -18, 5, -128,
|
||||
40, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, 4, -128, 63, 66, 75, -128,
|
||||
70, 60, 34, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
87, 86, 95, 76, 91, 62, 72, -6, -50, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, 64, 83, 104, 70,
|
||||
98, 90, 111, 89, 109, 80, 71, -128, -128, -128, -128, -128,
|
||||
-20, -6, 27, 33, 86, 88, 108, 75, 108, 76, 98, 64,
|
||||
75, 61, 71, 66, 85, -1, -77, -128, 46, 61, 92, 69,
|
||||
100, 93, 113, 80, 108, 93, 113, 91, 110, 80, 85, 15,
|
||||
-33, -128, 12, -50, 34, 50, 70, 55, 84, 72, 108, 81,
|
||||
111, 88, 100, 80, 84, 73, 97, 86, 99, 65, 85, 43,
|
||||
96, 78, 107, 94, 118, 98, 115, 92, 118, 94, 111, 93,
|
||||
111, 86, 99, 52, 32, -16, 48, 31, 81, 74, 85, 64,
|
||||
78, 64, 98, 70, 110, 92, 96, 73, 100, 72, 94, 73,
|
||||
98, 76, 85, 67, 101, 83, 101, 83, 112, 89, 98, 85,
|
||||
105, 78, 98, 72, 102, 80, 95, 23, 19, -8, 52, 57,
|
||||
103, 91, 95, 65, 74, 8, 77, 49, 96, 76, 100, 87,
|
||||
105, 81, 94, 62, 94, 78, 81, 72, 99, 82, 101, 78,
|
||||
108, 65, 82, 70, 100, 63, 79, 58, 80, 59, 87, 48,
|
||||
50, 57, 93, 67, 86, 80, 103, 56, 77, 31, 81, 57,
|
||||
62, 41, 96, 85, 91, 71, 101, 76, 89, 78, 95, 76,
|
||||
96, 79, 103, 81, 103, 48, 70, 57, 88, 66, 84, 11,
|
||||
85, 67, 104, 37, 38, 67, 90, 54, 81, 62, 90, 52,
|
||||
78, -60, 54, -8, 68, 40, 55, 8, 77, 52, 66, 31,
|
||||
55, 13, 60, 26, 69, 42, 63, -29, 57, -128, -3, -128,
|
||||
3, -128, -29, -60, 52, -43, 63, 56, 86, 75, 95, 75,
|
||||
85, 63, 82, 10, 50, -128, 31, -77, 0, -77, -23, -128,
|
||||
12, -77, 51, -3, 58, -14, 44, 0, 48, 4, 53, 47,
|
||||
28, -128, -128, -128, -37, -128, -3, -128, 49, 61, 100, 90,
|
||||
117, 88, 107, 94, 112, 64, 96, 83, -128, -128, 7, -128,
|
||||
-77, -128, -23, -128, -23, -128, 16, -37, 65, -8, 48, 20,
|
||||
14, -77, 57, -18, -43, -128, -128, -128, -128, -128, -128, -128,
|
||||
24, 12, 74, 76, 105, 76, 99, 80, 108, 79, 103, 85,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
42, -128, -8, -128, -50, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -60, -128, -128, 5, 73, 53, 93, 70, 101, 73,
|
||||
94, 57, 86, 66, -18, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -50, -128, 36, -128, -128, -128, -128, -128, -20, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, 23, 37,
|
||||
75, 54, 97, 70, 83, 52, 85, 65, 7, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -43, -128, 23, -128, -43, -128,
|
||||
-33, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -26, -37, 65, 33, 76, 37, 73, 50, 77, 47,
|
||||
-12, -128, -128, -128, -128, -128, -128, -128, -128, -128, -7, -14,
|
||||
-4, -128, -14, -128, 18, -60, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -26, -60, 71, 42, 68, 53,
|
||||
81, 49, 73, 36, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -18, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, 15, -26,
|
||||
44, -18, 59, 39, 57, 20, 62, 26, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, 49, -128, 30, 8, 69, 27, 62, 38,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -43, -128, 28, -37, 48, -10,
|
||||
48, 11, 74, 37, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-77, -128, 11, -128, -7, -60, -77, -4, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -8, -128, -50, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||
-128, -128, -128, -128,
|
||||
};
|
||||
|
@ -18,6 +18,6 @@ limitations under the License.
|
||||
|
||||
extern const int g_yes_micro_f2e59fea_nohash_1_width;
|
||||
extern const int g_yes_micro_f2e59fea_nohash_1_height;
|
||||
extern const unsigned char g_yes_micro_f2e59fea_nohash_1_data[];
|
||||
extern const signed char g_yes_micro_f2e59fea_nohash_1_data[];
|
||||
|
||||
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_YES_MICRO_FEATURES_DATA_H_
|
||||
|
@ -48,14 +48,19 @@ TF_LITE_MICRO_TEST(TestInvoke) {
|
||||
// needed by this graph.
|
||||
//
|
||||
// tflite::ops::micro::AllOpsResolver resolver;
|
||||
tflite::MicroOpResolver<3> micro_op_resolver;
|
||||
micro_op_resolver.AddBuiltin(
|
||||
tflite::BuiltinOperator_DEPTHWISE_CONV_2D,
|
||||
tflite::ops::micro::Register_DEPTHWISE_CONV_2D());
|
||||
tflite::MicroOpResolver<4> micro_op_resolver;
|
||||
micro_op_resolver.AddBuiltin(tflite::BuiltinOperator_DEPTHWISE_CONV_2D,
|
||||
tflite::ops::micro::Register_DEPTHWISE_CONV_2D(),
|
||||
tflite::MicroOpResolverAnyVersion());
|
||||
micro_op_resolver.AddBuiltin(tflite::BuiltinOperator_FULLY_CONNECTED,
|
||||
tflite::ops::micro::Register_FULLY_CONNECTED());
|
||||
tflite::ops::micro::Register_FULLY_CONNECTED(),
|
||||
tflite::MicroOpResolverAnyVersion());
|
||||
micro_op_resolver.AddBuiltin(tflite::BuiltinOperator_SOFTMAX,
|
||||
tflite::ops::micro::Register_SOFTMAX());
|
||||
tflite::ops::micro::Register_SOFTMAX(),
|
||||
tflite::MicroOpResolverAnyVersion());
|
||||
micro_op_resolver.AddBuiltin(tflite::BuiltinOperator_RESHAPE,
|
||||
tflite::ops::micro::Register_RESHAPE(),
|
||||
tflite::MicroOpResolverAnyVersion());
|
||||
|
||||
// Create an area of memory to use for input, output, and intermediate arrays.
|
||||
const int tensor_arena_size = 10 * 1024;
|
||||
@ -71,18 +76,16 @@ TF_LITE_MICRO_TEST(TestInvoke) {
|
||||
|
||||
// Make sure the input has the properties we expect.
|
||||
TF_LITE_MICRO_EXPECT_NE(nullptr, input);
|
||||
TF_LITE_MICRO_EXPECT_EQ(4, input->dims->size);
|
||||
TF_LITE_MICRO_EXPECT_EQ(2, input->dims->size);
|
||||
TF_LITE_MICRO_EXPECT_EQ(1, input->dims->data[0]);
|
||||
TF_LITE_MICRO_EXPECT_EQ(49, input->dims->data[1]);
|
||||
TF_LITE_MICRO_EXPECT_EQ(40, input->dims->data[2]);
|
||||
TF_LITE_MICRO_EXPECT_EQ(1, input->dims->data[3]);
|
||||
TF_LITE_MICRO_EXPECT_EQ(kTfLiteUInt8, input->type);
|
||||
TF_LITE_MICRO_EXPECT_EQ(1960, input->dims->data[1]);
|
||||
TF_LITE_MICRO_EXPECT_EQ(kTfLiteInt8, input->type);
|
||||
|
||||
// Copy a spectrogram created from a .wav audio file of someone saying "Yes",
|
||||
// into the memory area used for the input.
|
||||
const uint8_t* yes_features_data = g_yes_micro_f2e59fea_nohash_1_data;
|
||||
const int8_t* yes_features_data = g_yes_micro_f2e59fea_nohash_1_data;
|
||||
for (int i = 0; i < input->bytes; ++i) {
|
||||
input->data.uint8[i] = yes_features_data[i];
|
||||
input->data.int8[i] = yes_features_data[i];
|
||||
}
|
||||
|
||||
// Run the model on this input and make sure it succeeds.
|
||||
@ -98,7 +101,7 @@ TF_LITE_MICRO_TEST(TestInvoke) {
|
||||
TF_LITE_MICRO_EXPECT_EQ(2, output->dims->size);
|
||||
TF_LITE_MICRO_EXPECT_EQ(1, output->dims->data[0]);
|
||||
TF_LITE_MICRO_EXPECT_EQ(4, output->dims->data[1]);
|
||||
TF_LITE_MICRO_EXPECT_EQ(kTfLiteUInt8, output->type);
|
||||
TF_LITE_MICRO_EXPECT_EQ(kTfLiteInt8, output->type);
|
||||
|
||||
// There are four possible classes in the output, each with a score.
|
||||
const int kSilenceIndex = 0;
|
||||
@ -107,18 +110,18 @@ TF_LITE_MICRO_TEST(TestInvoke) {
|
||||
const int kNoIndex = 3;
|
||||
|
||||
// Make sure that the expected "Yes" score is higher than the other classes.
|
||||
uint8_t silence_score = output->data.uint8[kSilenceIndex];
|
||||
uint8_t unknown_score = output->data.uint8[kUnknownIndex];
|
||||
uint8_t yes_score = output->data.uint8[kYesIndex];
|
||||
uint8_t no_score = output->data.uint8[kNoIndex];
|
||||
uint8_t silence_score = output->data.uint8[kSilenceIndex] + 128;
|
||||
uint8_t unknown_score = output->data.uint8[kUnknownIndex] + 128;
|
||||
uint8_t yes_score = output->data.int8[kYesIndex] + 128;
|
||||
uint8_t no_score = output->data.int8[kNoIndex] + 128;
|
||||
TF_LITE_MICRO_EXPECT_GT(yes_score, silence_score);
|
||||
TF_LITE_MICRO_EXPECT_GT(yes_score, unknown_score);
|
||||
TF_LITE_MICRO_EXPECT_GT(yes_score, no_score);
|
||||
|
||||
// Now test with a different input, from a recording of "No".
|
||||
const uint8_t* no_features_data = g_no_micro_f9643d42_nohash_4_data;
|
||||
const int8_t* no_features_data = g_no_micro_f9643d42_nohash_4_data;
|
||||
for (int i = 0; i < input->bytes; ++i) {
|
||||
input->data.uint8[i] = no_features_data[i];
|
||||
input->data.int8[i] = no_features_data[i];
|
||||
}
|
||||
|
||||
// Run the model on this "No" input.
|
||||
@ -134,13 +137,13 @@ TF_LITE_MICRO_TEST(TestInvoke) {
|
||||
TF_LITE_MICRO_EXPECT_EQ(2, output->dims->size);
|
||||
TF_LITE_MICRO_EXPECT_EQ(1, output->dims->data[0]);
|
||||
TF_LITE_MICRO_EXPECT_EQ(4, output->dims->data[1]);
|
||||
TF_LITE_MICRO_EXPECT_EQ(kTfLiteUInt8, output->type);
|
||||
TF_LITE_MICRO_EXPECT_EQ(kTfLiteInt8, output->type);
|
||||
|
||||
// Make sure that the expected "No" score is higher than the other classes.
|
||||
silence_score = output->data.uint8[kSilenceIndex];
|
||||
unknown_score = output->data.uint8[kUnknownIndex];
|
||||
yes_score = output->data.uint8[kYesIndex];
|
||||
no_score = output->data.uint8[kNoIndex];
|
||||
silence_score = output->data.int8[kSilenceIndex] + 128;
|
||||
unknown_score = output->data.int8[kUnknownIndex] + 128;
|
||||
yes_score = output->data.int8[kYesIndex] + 128;
|
||||
no_score = output->data.int8[kNoIndex] + 128;
|
||||
TF_LITE_MICRO_EXPECT_GT(no_score, silence_score);
|
||||
TF_LITE_MICRO_EXPECT_GT(no_score, unknown_score);
|
||||
TF_LITE_MICRO_EXPECT_GT(no_score, yes_score);
|
||||
|
@ -47,10 +47,10 @@ TfLiteStatus RecognizeCommands::ProcessLatestResults(
|
||||
return kTfLiteError;
|
||||
}
|
||||
|
||||
if (latest_results->type != kTfLiteUInt8) {
|
||||
if (latest_results->type != kTfLiteInt8) {
|
||||
TF_LITE_REPORT_ERROR(
|
||||
error_reporter_,
|
||||
"The results for recognition should be uint8 elements, but are %d",
|
||||
"The results for recognition should be int8 elements, but are %d",
|
||||
latest_results->type);
|
||||
return kTfLiteError;
|
||||
}
|
||||
@ -66,7 +66,7 @@ TfLiteStatus RecognizeCommands::ProcessLatestResults(
|
||||
}
|
||||
|
||||
// Add the latest results to the head of the queue.
|
||||
previous_results_.push_back({current_time_ms, latest_results->data.uint8});
|
||||
previous_results_.push_back({current_time_ms, latest_results->data.int8});
|
||||
|
||||
// Prune any earlier results that are too old for the averaging window.
|
||||
const int64_t time_limit = current_time_ms - average_window_duration_ms_;
|
||||
@ -93,12 +93,12 @@ TfLiteStatus RecognizeCommands::ProcessLatestResults(
|
||||
for (int offset = 0; offset < previous_results_.size(); ++offset) {
|
||||
PreviousResultsQueue::Result previous_result =
|
||||
previous_results_.from_front(offset);
|
||||
const uint8_t* scores = previous_result.scores_;
|
||||
const int8_t* scores = previous_result.scores;
|
||||
for (int i = 0; i < kCategoryCount; ++i) {
|
||||
if (offset == 0) {
|
||||
average_scores[i] = scores[i];
|
||||
average_scores[i] = scores[i] + 128;
|
||||
} else {
|
||||
average_scores[i] += scores[i];
|
||||
average_scores[i] += scores[i] + 128;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,14 +36,14 @@ class PreviousResultsQueue {
|
||||
// Data structure that holds an inference result, and the time when it
|
||||
// was recorded.
|
||||
struct Result {
|
||||
Result() : time_(0), scores_() {}
|
||||
Result(int32_t time, uint8_t* scores) : time_(time) {
|
||||
Result() : time_(0), scores() {}
|
||||
Result(int32_t time, int8_t* input_scores) : time_(time) {
|
||||
for (int i = 0; i < kCategoryCount; ++i) {
|
||||
scores_[i] = scores[i];
|
||||
scores[i] = input_scores[i];
|
||||
}
|
||||
}
|
||||
int32_t time_;
|
||||
uint8_t scores_[kCategoryCount];
|
||||
int8_t scores[kCategoryCount];
|
||||
};
|
||||
|
||||
int size() { return size_; }
|
||||
|
@ -27,13 +27,13 @@ TF_LITE_MICRO_TEST(PreviousResultsQueueBasic) {
|
||||
PreviousResultsQueue queue(error_reporter);
|
||||
TF_LITE_MICRO_EXPECT_EQ(0, queue.size());
|
||||
|
||||
uint8_t scores_a[4] = {0, 0, 0, 1};
|
||||
int8_t scores_a[4] = {0, 0, 0, 1};
|
||||
queue.push_back({0, scores_a});
|
||||
TF_LITE_MICRO_EXPECT_EQ(1, queue.size());
|
||||
TF_LITE_MICRO_EXPECT_EQ(0, queue.front().time_);
|
||||
TF_LITE_MICRO_EXPECT_EQ(0, queue.back().time_);
|
||||
|
||||
uint8_t scores_b[4] = {0, 0, 1, 0};
|
||||
int8_t scores_b[4] = {0, 0, 1, 0};
|
||||
queue.push_back({1, scores_b});
|
||||
TF_LITE_MICRO_EXPECT_EQ(2, queue.size());
|
||||
TF_LITE_MICRO_EXPECT_EQ(0, queue.front().time_);
|
||||
@ -45,7 +45,7 @@ TF_LITE_MICRO_TEST(PreviousResultsQueueBasic) {
|
||||
TF_LITE_MICRO_EXPECT_EQ(1, queue.front().time_);
|
||||
TF_LITE_MICRO_EXPECT_EQ(1, queue.back().time_);
|
||||
|
||||
uint8_t scores_c[4] = {0, 1, 0, 0};
|
||||
int8_t scores_c[4] = {0, 1, 0, 0};
|
||||
queue.push_back({2, scores_c});
|
||||
TF_LITE_MICRO_EXPECT_EQ(2, queue.size());
|
||||
TF_LITE_MICRO_EXPECT_EQ(1, queue.front().time_);
|
||||
@ -60,7 +60,7 @@ TF_LITE_MICRO_TEST(PreviousResultsQueuePushPop) {
|
||||
TF_LITE_MICRO_EXPECT_EQ(0, queue.size());
|
||||
|
||||
for (int i = 0; i < 123; ++i) {
|
||||
uint8_t scores[4] = {0, 0, 0, 1};
|
||||
int8_t scores[4] = {0, 0, 0, 1};
|
||||
queue.push_back({i, scores});
|
||||
TF_LITE_MICRO_EXPECT_EQ(1, queue.size());
|
||||
TF_LITE_MICRO_EXPECT_EQ(i, queue.front().time_);
|
||||
@ -78,11 +78,11 @@ TF_LITE_MICRO_TEST(RecognizeCommandsTestBasic) {
|
||||
|
||||
RecognizeCommands recognize_commands(error_reporter);
|
||||
|
||||
std::initializer_list<uint8_t> result_data = {255, 0, 0, 0};
|
||||
std::initializer_list<int8_t> result_data = {127, -128, -128, -128};
|
||||
auto result_dims = {2, 1, 4};
|
||||
TfLiteTensor results = tflite::testing::CreateQuantizedTensor(
|
||||
result_data, tflite::testing::IntArrayFromInitializer(result_dims),
|
||||
"input_tensor", 0.0f, 128.0f);
|
||||
"input_tensor", -128.0f, 127.0f);
|
||||
|
||||
const char* found_command;
|
||||
uint8_t score;
|
||||
@ -98,11 +98,11 @@ TF_LITE_MICRO_TEST(RecognizeCommandsTestFindCommands) {
|
||||
|
||||
RecognizeCommands recognize_commands(error_reporter, 1000, 51);
|
||||
|
||||
std::initializer_list<uint8_t> yes_data = {0, 0, 255, 0};
|
||||
std::initializer_list<int8_t> yes_data = {-128, -128, 127, -128};
|
||||
auto yes_dims = {2, 1, 4};
|
||||
TfLiteTensor yes_results = tflite::testing::CreateQuantizedTensor(
|
||||
yes_data, tflite::testing::IntArrayFromInitializer(yes_dims),
|
||||
"input_tensor", 0.0f, 128.0f);
|
||||
"input_tensor", -128.0f, 127.0f);
|
||||
|
||||
bool has_found_new_command = false;
|
||||
const char* new_command;
|
||||
@ -126,11 +126,11 @@ TF_LITE_MICRO_TEST(RecognizeCommandsTestFindCommands) {
|
||||
TF_LITE_MICRO_EXPECT_EQ(0, tflite::testing::TestStrcmp("yes", new_command));
|
||||
}
|
||||
|
||||
std::initializer_list<uint8_t> no_data = {0, 0, 0, 255};
|
||||
std::initializer_list<int8_t> no_data = {-128, -128, -128, 127};
|
||||
auto no_dims = {2, 1, 4};
|
||||
TfLiteTensor no_results = tflite::testing::CreateQuantizedTensor(
|
||||
no_data, tflite::testing::IntArrayFromInitializer(no_dims),
|
||||
"input_tensor", 0.0f, 128.0f);
|
||||
"input_tensor", -128.0f, 127.0f);
|
||||
has_found_new_command = false;
|
||||
new_command = "";
|
||||
uint8_t score;
|
||||
@ -161,11 +161,11 @@ TF_LITE_MICRO_TEST(RecognizeCommandsTestBadInputLength) {
|
||||
|
||||
RecognizeCommands recognize_commands(error_reporter, 1000, 51);
|
||||
|
||||
std::initializer_list<uint8_t> bad_data = {0, 0, 255};
|
||||
std::initializer_list<int8_t> bad_data = {-128, -128, 127};
|
||||
auto bad_dims = {2, 1, 3};
|
||||
TfLiteTensor bad_results = tflite::testing::CreateQuantizedTensor(
|
||||
bad_data, tflite::testing::IntArrayFromInitializer(bad_dims),
|
||||
"input_tensor", 0.0f, 128.0f);
|
||||
"input_tensor", -128.0f, 127.0f);
|
||||
|
||||
const char* found_command;
|
||||
uint8_t score;
|
||||
@ -181,11 +181,11 @@ TF_LITE_MICRO_TEST(RecognizeCommandsTestBadInputTimes) {
|
||||
|
||||
RecognizeCommands recognize_commands(error_reporter, 1000, 51);
|
||||
|
||||
std::initializer_list<uint8_t> result_data = {0, 0, 255, 0};
|
||||
std::initializer_list<int8_t> result_data = {-128, -128, 127, -128};
|
||||
auto result_dims = {2, 1, 4};
|
||||
TfLiteTensor results = tflite::testing::CreateQuantizedTensor(
|
||||
result_data, tflite::testing::IntArrayFromInitializer(result_dims),
|
||||
"input_tensor", 0.0f, 128.0f);
|
||||
"input_tensor", -128.0f, 127.0f);
|
||||
|
||||
const char* found_command;
|
||||
uint8_t score;
|
||||
@ -204,11 +204,11 @@ TF_LITE_MICRO_TEST(RecognizeCommandsTestTooFewInputs) {
|
||||
|
||||
RecognizeCommands recognize_commands(error_reporter, 1000, 51);
|
||||
|
||||
std::initializer_list<uint8_t> result_data = {0, 0, 255, 0};
|
||||
std::initializer_list<int8_t> result_data = {-128, -128, 127, -128};
|
||||
auto result_dims = {2, 1, 4};
|
||||
TfLiteTensor results = tflite::testing::CreateQuantizedTensor(
|
||||
result_data, tflite::testing::IntArrayFromInitializer(result_dims),
|
||||
"input_tensor", 0.0f, 128.0f);
|
||||
"input_tensor", -128.0f, 127.0f);
|
||||
|
||||
const char* found_command;
|
||||
uint8_t score;
|
||||
|
Loading…
Reference in New Issue
Block a user