mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Update TensorFlow to latest
This commit is contained in:
parent
1789910002
commit
5e3e38529d
Binary file not shown.
@ -20,7 +20,7 @@ int libtf_get_input_data_hwc(const unsigned char *model_data, // TensorFlow Lite
|
|||||||
unsigned int *input_width, // Width for the model.
|
unsigned int *input_width, // Width for the model.
|
||||||
unsigned int *input_channels, // Channels for the model (1 for grayscale8 and 3 for rgb888).
|
unsigned int *input_channels, // Channels for the model (1 for grayscale8 and 3 for rgb888).
|
||||||
bool *signed_or_unsigned, // True if input is int8_t ([0:255]->[-128:127]), False if input is uint8_t ([0:255]->[0:255]).
|
bool *signed_or_unsigned, // True if input is int8_t ([0:255]->[-128:127]), False if input is uint8_t ([0:255]->[0:255]).
|
||||||
bool *is_float); // Actual is float32 (not optimal - network should be fixed). Input should be ([0:255]->[-1.0f:+1.0f]).
|
bool *is_float); // Actual is float32 (not optimal - network should be fixed). Input should be ([0:255]->[0.0f:+1.0f]).
|
||||||
|
|
||||||
// Call this second to get the shape of the model output.
|
// Call this second to get the shape of the model output.
|
||||||
// Returns 0 on success and 1 on failure.
|
// Returns 0 on success and 1 on failure.
|
||||||
@ -32,7 +32,7 @@ int libtf_get_output_data_hwc(const unsigned char *model_data, // TensorFlow Lit
|
|||||||
unsigned int *output_width, // Width for the model.
|
unsigned int *output_width, // Width for the model.
|
||||||
unsigned int *output_channels, // Channels for the model (1 for grayscale8 and 3 for rgb888).
|
unsigned int *output_channels, // Channels for the model (1 for grayscale8 and 3 for rgb888).
|
||||||
bool *signed_or_unsigned, // True if output is int8_t ([-128:127]->[0:255]->[0.0f:1.0f]), False if output is uint8_t ([0:255]->[0:255]->[0.0f:1.0f]).
|
bool *signed_or_unsigned, // True if output is int8_t ([-128:127]->[0:255]->[0.0f:1.0f]), False if output is uint8_t ([0:255]->[0:255]->[0.0f:1.0f]).
|
||||||
bool *is_float); // Actual is float32 (not optimal - network should be fixed). Output should be ([-1.0f:+1.0f]->[0:255]->[0.0f:1.0f]).
|
bool *is_float); // Actual is float32 (not optimal - network should be fixed). Output is [0.0f:+1.0f].
|
||||||
|
|
||||||
// Callback to populate the model input data byte array (laid out in [height][width][channel] order).
|
// Callback to populate the model input data byte array (laid out in [height][width][channel] order).
|
||||||
typedef void (*libtf_input_data_callback_t)(void *callback_data,
|
typedef void (*libtf_input_data_callback_t)(void *callback_data,
|
||||||
@ -41,7 +41,7 @@ typedef void (*libtf_input_data_callback_t)(void *callback_data,
|
|||||||
const unsigned int input_width,
|
const unsigned int input_width,
|
||||||
const unsigned int input_channels,
|
const unsigned int input_channels,
|
||||||
const bool signed_or_unsigned, // True if input is int8_t ([0:255]->[-128:127]), False if input is uint8_t ([0:255]->[0:255]).
|
const bool signed_or_unsigned, // True if input is int8_t ([0:255]->[-128:127]), False if input is uint8_t ([0:255]->[0:255]).
|
||||||
const bool is_float); // Actual is float32 (not optimal - network should be fixed). Input should be ([0:255]->[-1.0f:+1.0f]).
|
const bool is_float); // Actual is float32 (not optimal - network should be fixed). Input should be ([0:255]->[0.0f:+1.0f]).
|
||||||
|
|
||||||
// Callback to use the model output data byte array (laid out in [height][width][channel] order).
|
// Callback to use the model output data byte array (laid out in [height][width][channel] order).
|
||||||
typedef void (*libtf_output_data_callback_t)(void *callback_data,
|
typedef void (*libtf_output_data_callback_t)(void *callback_data,
|
||||||
@ -50,7 +50,7 @@ typedef void (*libtf_output_data_callback_t)(void *callback_data,
|
|||||||
const unsigned int output_width,
|
const unsigned int output_width,
|
||||||
const unsigned int output_channels,
|
const unsigned int output_channels,
|
||||||
const bool signed_or_unsigned, // True if output is int8_t ([-128:127]->[0:255]->[0.0f:1.0f]), False if output is uint8_t ([0:255]->[0:255]->[0.0f:1.0f]).
|
const bool signed_or_unsigned, // True if output is int8_t ([-128:127]->[0:255]->[0.0f:1.0f]), False if output is uint8_t ([0:255]->[0:255]->[0.0f:1.0f]).
|
||||||
const bool is_float); // Actual is float32 (not optimal - network should be fixed). Output should be ([-1.0f:+1.0f]->[0:255]->[0.0f:1.0f]).
|
const bool is_float); // Actual is float32 (not optimal - network should be fixed). Output is [0.0f:+1.0f].
|
||||||
|
|
||||||
// Returns 0 on success and 1 on failure.
|
// Returns 0 on success and 1 on failure.
|
||||||
// Errors are printed to stdout.
|
// Errors are printed to stdout.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -20,7 +20,7 @@ int libtf_get_input_data_hwc(const unsigned char *model_data, // TensorFlow Lite
|
|||||||
unsigned int *input_width, // Width for the model.
|
unsigned int *input_width, // Width for the model.
|
||||||
unsigned int *input_channels, // Channels for the model (1 for grayscale8 and 3 for rgb888).
|
unsigned int *input_channels, // Channels for the model (1 for grayscale8 and 3 for rgb888).
|
||||||
bool *signed_or_unsigned, // True if input is int8_t ([0:255]->[-128:127]), False if input is uint8_t ([0:255]->[0:255]).
|
bool *signed_or_unsigned, // True if input is int8_t ([0:255]->[-128:127]), False if input is uint8_t ([0:255]->[0:255]).
|
||||||
bool *is_float); // Actual is float32 (not optimal - network should be fixed). Input should be ([0:255]->[-1.0f:+1.0f]).
|
bool *is_float); // Actual is float32 (not optimal - network should be fixed). Input should be ([0:255]->[0.0f:+1.0f]).
|
||||||
|
|
||||||
// Call this second to get the shape of the model output.
|
// Call this second to get the shape of the model output.
|
||||||
// Returns 0 on success and 1 on failure.
|
// Returns 0 on success and 1 on failure.
|
||||||
@ -32,7 +32,7 @@ int libtf_get_output_data_hwc(const unsigned char *model_data, // TensorFlow Lit
|
|||||||
unsigned int *output_width, // Width for the model.
|
unsigned int *output_width, // Width for the model.
|
||||||
unsigned int *output_channels, // Channels for the model (1 for grayscale8 and 3 for rgb888).
|
unsigned int *output_channels, // Channels for the model (1 for grayscale8 and 3 for rgb888).
|
||||||
bool *signed_or_unsigned, // True if output is int8_t ([-128:127]->[0:255]->[0.0f:1.0f]), False if output is uint8_t ([0:255]->[0:255]->[0.0f:1.0f]).
|
bool *signed_or_unsigned, // True if output is int8_t ([-128:127]->[0:255]->[0.0f:1.0f]), False if output is uint8_t ([0:255]->[0:255]->[0.0f:1.0f]).
|
||||||
bool *is_float); // Actual is float32 (not optimal - network should be fixed). Output should be ([-1.0f:+1.0f]->[0:255]->[0.0f:1.0f]).
|
bool *is_float); // Actual is float32 (not optimal - network should be fixed). Output is [0.0f:+1.0f].
|
||||||
|
|
||||||
// Callback to populate the model input data byte array (laid out in [height][width][channel] order).
|
// Callback to populate the model input data byte array (laid out in [height][width][channel] order).
|
||||||
typedef void (*libtf_input_data_callback_t)(void *callback_data,
|
typedef void (*libtf_input_data_callback_t)(void *callback_data,
|
||||||
@ -41,7 +41,7 @@ typedef void (*libtf_input_data_callback_t)(void *callback_data,
|
|||||||
const unsigned int input_width,
|
const unsigned int input_width,
|
||||||
const unsigned int input_channels,
|
const unsigned int input_channels,
|
||||||
const bool signed_or_unsigned, // True if input is int8_t ([0:255]->[-128:127]), False if input is uint8_t ([0:255]->[0:255]).
|
const bool signed_or_unsigned, // True if input is int8_t ([0:255]->[-128:127]), False if input is uint8_t ([0:255]->[0:255]).
|
||||||
const bool is_float); // Actual is float32 (not optimal - network should be fixed). Input should be ([0:255]->[-1.0f:+1.0f]).
|
const bool is_float); // Actual is float32 (not optimal - network should be fixed). Input should be ([0:255]->[0.0f:+1.0f]).
|
||||||
|
|
||||||
// Callback to use the model output data byte array (laid out in [height][width][channel] order).
|
// Callback to use the model output data byte array (laid out in [height][width][channel] order).
|
||||||
typedef void (*libtf_output_data_callback_t)(void *callback_data,
|
typedef void (*libtf_output_data_callback_t)(void *callback_data,
|
||||||
@ -50,7 +50,7 @@ typedef void (*libtf_output_data_callback_t)(void *callback_data,
|
|||||||
const unsigned int output_width,
|
const unsigned int output_width,
|
||||||
const unsigned int output_channels,
|
const unsigned int output_channels,
|
||||||
const bool signed_or_unsigned, // True if output is int8_t ([-128:127]->[0:255]->[0.0f:1.0f]), False if output is uint8_t ([0:255]->[0:255]->[0.0f:1.0f]).
|
const bool signed_or_unsigned, // True if output is int8_t ([-128:127]->[0:255]->[0.0f:1.0f]), False if output is uint8_t ([0:255]->[0:255]->[0.0f:1.0f]).
|
||||||
const bool is_float); // Actual is float32 (not optimal - network should be fixed). Output should be ([-1.0f:+1.0f]->[0:255]->[0.0f:1.0f]).
|
const bool is_float); // Actual is float32 (not optimal - network should be fixed). Output is [0.0f:+1.0f].
|
||||||
|
|
||||||
// Returns 0 on success and 1 on failure.
|
// Returns 0 on success and 1 on failure.
|
||||||
// Errors are printed to stdout.
|
// Errors are printed to stdout.
|
||||||
|
|||||||
Binary file not shown.
@ -132,9 +132,9 @@
|
|||||||
#define IMLIB_ENABLE_BARCODES
|
#define IMLIB_ENABLE_BARCODES
|
||||||
|
|
||||||
// Enable CMSIS NN
|
// Enable CMSIS NN
|
||||||
#if !defined(CUBEAI)
|
// #if !defined(CUBEAI)
|
||||||
#define IMLIB_ENABLE_CNN
|
// #define IMLIB_ENABLE_CNN
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
// Enable Tensor Flow
|
// Enable Tensor Flow
|
||||||
#if !defined(CUBEAI)
|
#if !defined(CUBEAI)
|
||||||
|
|||||||
@ -132,9 +132,9 @@
|
|||||||
#define IMLIB_ENABLE_BARCODES
|
#define IMLIB_ENABLE_BARCODES
|
||||||
|
|
||||||
// Enable CMSIS NN
|
// Enable CMSIS NN
|
||||||
#if !defined(CUBEAI)
|
// #if !defined(CUBEAI)
|
||||||
#define IMLIB_ENABLE_CNN
|
// #define IMLIB_ENABLE_CNN
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
// Enable Tensor Flow
|
// Enable Tensor Flow
|
||||||
#if !defined(CUBEAI)
|
#if !defined(CUBEAI)
|
||||||
|
|||||||
@ -132,9 +132,9 @@
|
|||||||
#define IMLIB_ENABLE_BARCODES
|
#define IMLIB_ENABLE_BARCODES
|
||||||
|
|
||||||
// Enable CMSIS NN
|
// Enable CMSIS NN
|
||||||
#if !defined(CUBEAI)
|
// #if !defined(CUBEAI)
|
||||||
#define IMLIB_ENABLE_CNN
|
// #define IMLIB_ENABLE_CNN
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
// Enable Tensor Flow
|
// Enable Tensor Flow
|
||||||
#if !defined(CUBEAI)
|
#if !defined(CUBEAI)
|
||||||
|
|||||||
@ -132,9 +132,9 @@
|
|||||||
#define IMLIB_ENABLE_BARCODES
|
#define IMLIB_ENABLE_BARCODES
|
||||||
|
|
||||||
// Enable CMSIS NN
|
// Enable CMSIS NN
|
||||||
#if !defined(CUBEAI)
|
// #if !defined(CUBEAI)
|
||||||
#define IMLIB_ENABLE_CNN
|
// #define IMLIB_ENABLE_CNN
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
// Enable Tensor Flow
|
// Enable Tensor Flow
|
||||||
#if !defined(CUBEAI)
|
#if !defined(CUBEAI)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user