mirror of
https://github.com/vee1e/tflite-micro.git
synced 2026-09-04 11:17:42 +00:00
* First pass working with float input/output * Numpy buffer input works. Got a sine graph for hello world output. Copyright notice * Remove static references * Output tensors work * Output tensors work * bazel test works bazel test tensorflow/lite/micro/tools:interpreter_test --test_output=all * Successfully built extension with Python setuptools cd tensorflow/lite/micro/tools/interpreter_pypi python -m build pip install dist/example_tflm_interpreter_psho-0.0.3-cp39-cp39-linux_x86_64.whl --force-reinstall python tests/test-interpreter.py TestPyPi: pip uninstall example-tflm-interpreter-psho python -m twine upload --repository testpypi dist/example-tflm-interpreter-psho-0.0.3.tar.gz pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple example-tflm-interpreter-psho==0.0.3 python tests/test-interpreter.py * Refactored some * Cleaned for production and tested with conv model * Fixed formatting * Fixed numpy header issue for Docker. Need to fix double registration issue that's somehow only present in Docker. * Test fix with changes in ci.yml * Added sudo * Added nomsan and noasan tags to python test * Added -layering-check, used py_library instead of py_binary to generate conv model, added micro namespace * Removed extra debug code * Added new tests * Changed reinterpret_steal to cast * Addressed PR comments * size log refactor (#1156) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> * Addressed PR and review comments * adding documentation to log_binary* workflows. (#1161) * Automated binary size log update (#1160) * Create an allocator to manage persistent arena (#1174) * Create an allocator to manage persistent arena This PR corresponds to internal cl/452380512. Create an allocator to manage persistent arena. This is another step towards the feature of enabling the client to have two separate memory arenas. BUG=https://b/226971240 * Manually patch due to Makefile difference * Fix virtual environment when building Vela for Arm Ethos-U (#1177) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> * Removed print statement Co-authored-by: jwithers <jpwithers@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: TFLM-bot <tflm-github-bot@google.com> Co-authored-by: deqiangc <86809673+deqiangc@users.noreply.github.com> Co-authored-by: Måns Nilsson <mans.nilsson@arm.com>
33 lines
1.2 KiB
C++
33 lines
1.2 KiB
C++
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
==============================================================================*/
|
|
#ifndef TENSORFLOW_LITE_MICRO_TOOLS_PYTHON_INTERPRETER_NUMPY_UTILS_H_
|
|
#define TENSORFLOW_LITE_MICRO_TOOLS_PYTHON_INTERPRETER_NUMPY_UTILS_H_
|
|
|
|
// Disallow Numpy 1.7 deprecated symbols.
|
|
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
|
|
#include <numpy/ndarraytypes.h>
|
|
|
|
#include "tensorflow/lite/c/c_api_types.h"
|
|
|
|
namespace tflite {
|
|
|
|
void* ImportNumpy();
|
|
int TfLiteTypeToPyArrayType(TfLiteType tf_lite_type);
|
|
TfLiteType TfLiteTypeFromPyType(int py_type);
|
|
TfLiteType TfLiteTypeFromPyArray(const PyArrayObject* array);
|
|
|
|
} // namespace tflite
|
|
|
|
#endif
|