Skip to content

Commit df7ce56

Browse files
lintian06copybara-github
authored andcommitted
Update tflite-model-maker APIs to 0.3.2.
PiperOrigin-RevId: 374055079
1 parent f288eff commit df7ce56

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

tensorflow_examples/lite/model_maker/README.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -42,39 +42,44 @@ cd examples/tensorflow_examples/lite/model_maker/pip_package
4242
pip install -e .
4343
```
4444

45+
TensorFlow Lite Model Maker depends on TensorFlow
46+
[pip package](https://www.tensorflow.org/install/pip). For GPU support, please
47+
refer to TensorFlow's [GPU guide](https://www.tensorflow.org/install/gpu) or
48+
[installation guide](https://www.tensorflow.org/install).
49+
4550
## End-to-End Example
4651

4752
For instance, it could have an end-to-end image classification example that
4853
utilizes this library with just 4 lines of code, each of which representing one
4954
step of the overall process. For more detail, you could refer to
5055
[Colab for image classification](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_image_classification.ipynb).
5156

52-
* 1. Import the required modules.
57+
* Step 1. Import the required modules.
5358

5459
```python
5560
from tflite_model_maker import image_classifier
5661
from tflite_model_maker.image_classifier import DataLoader
5762
```
5863

59-
* 2. Load input data specific to an on-device ML app.
64+
* Step 2. Load input data specific to an on-device ML app.
6065

6166
```python
6267
data = DataLoader.from_folder('flower_photos/')
6368
```
6469

65-
* 3. Customize the TensorFlow model.
70+
* Step 3. Customize the TensorFlow model.
6671

6772
```python
6873
model = image_classifier.create(data)
6974
```
7075

71-
* 4. Evaluate the model.
76+
* Step 4. Evaluate the model.
7277

7378
```python
7479
loss, accuracy = model.evaluate()
7580
```
7681

77-
* 5. Export to Tensorflow Lite model and label file in `export_dir`.
82+
* Step 5. Export to Tensorflow Lite model and label file in `export_dir`.
7883

7984
```python
8085
model.export(export_dir='/tmp/')
@@ -86,6 +91,8 @@ Currently, we support image classification, text classification and question
8691
answer tasks. Meanwhile, we provide demo code for each of them in demo folder.
8792

8893
* [Overview for TensorFlow Lite Model Maker](https://www.tensorflow.org/lite/guide/model_maker)
94+
* [Python API Reference](https://www.tensorflow.org/lite/api_docs/python/tflite_model_maker)
8995
* [Colab for image classification](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_image_classification.ipynb)
9096
* [Colab for text classification](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_text_classification.ipynb)
9197
* [Colab for BERT question answer](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_question_answer.ipynb)
98+
* [Colab for object detection](https://www.tensorflow.org/lite/tutorials/model_maker_object_detection)

tensorflow_examples/lite/model_maker/RELEASE.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release 0.3
22

3+
## 0.3.2
4+
5+
* Minor fix: Move librosa to an optional library for audio task.
6+
37
## 0.3.1
48

59
* Polish document showing in

tensorflow_examples/lite/model_maker/pip_package/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@
5757
# Set package version.
5858
if nightly:
5959
project_name = '{}-nightly'.format(project_name)
60-
version = '0.3.2' # Version prefix, usually major.minor.micro.
60+
version = '0.3.3' # Version prefix, usually major.minor.micro.
6161
version = '{:s}.dev{:s}'.format(version, datestring)
6262
classifiers += [
6363
'Development Status :: 4 - Beta',
6464
]
6565
else:
6666
# LINT.IfChange(model_maker_pip_version)
67-
version = '0.3.1'
67+
version = '0.3.2'
6868
# LINT.ThenChange(../public/__init__.py, ../RELEASE.md)
6969

7070
# Path to model_maker dir: <repo>/tensorflow_examples/lite/model_maker

tensorflow_examples/lite/model_maker/public/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@
5858
from tensorflow_examples.lite.model_maker.core.task import configs
5959
# pylint: enable=g-bad-import-order
6060

61-
__version__ = '0.3.1'
61+
__version__ = '0.3.2'

0 commit comments

Comments
 (0)