diff options
author | 2018-07-17 08:08:14 -0700 | |
---|---|---|
committer | 2018-07-17 08:12:12 -0700 | |
commit | 17b9b3f957654178b33c2b13a83b5f6b0690f16d (patch) | |
tree | 020a91069f3cd39820fcc6af812643703ec41ce2 /tensorflow/contrib/lite/util.h | |
parent | 09d35773d849b7f6aed72adbb3bf7eb79648a49a (diff) |
A map from TF Lite tensor indices to TensorFlow tensors.
PiperOrigin-RevId: 204912661
Diffstat (limited to 'tensorflow/contrib/lite/util.h')
-rw-r--r-- | tensorflow/contrib/lite/util.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/util.h b/tensorflow/contrib/lite/util.h index 89d9b4f5cf..3c4801183b 100644 --- a/tensorflow/contrib/lite/util.h +++ b/tensorflow/contrib/lite/util.h @@ -26,12 +26,17 @@ limitations under the License. namespace tflite { -// Converts a `std::vector` to a `TfLiteIntArray`. +// Converts a `std::vector` to a `TfLiteIntArray`. The caller takes ownership +// of the returned pointer. TfLiteIntArray* ConvertVectorToTfLiteIntArray(const std::vector<int>& input); +// Converts an array (of the given size) to a `TfLiteIntArray`. The caller +// takes ownership of the returned pointer, and must make sure 'dims' has at +// least 'rank' elemnts. TfLiteIntArray* ConvertArrayToTfLiteIntArray(const int rank, const int* dims); // Checks whether a `TfLiteIntArray` and an int array have matching elements. +// The caller must guarantee that 'b' has at least 'b_size' elements. bool EqualArrayAndTfLiteIntArray(const TfLiteIntArray* a, const int b_size, const int* b); |