Skip to content

Commit

Permalink
feat(components): Added converter components for Tensorflow Lite mode…
Browse files Browse the repository at this point in the history
…ls (#4532)
  • Loading branch information
Ark-kun authored Sep 22, 2020
1 parent 06bf429 commit 1802db3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Convert Keras HDF5 model to Tensorflow Lite model
inputs:
- {name: Model, type: KerasModelHdf5}
outputs:
- {name: Model, type: TensorflowLiteModel}
metadata:
annotations:
author: Alexey Volkov <alexey.volkov@ark-kun.com>
implementation:
container:
image: tensorflow/tensorflow:2.3.0
command:
- sh
- -exc
- |
model_path="$0"
output_model_path="$1"
mkdir -p "$(dirname "$output_model_path")"
tflite_convert --keras_model_file "$model_path" --output_file "$output_model_path"
- {inputPath: Model}
- {outputPath: Model}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Convert Tensorflow SavedModel to Tensorflow Lite model
inputs:
- {name: Model, type: TensorflowSavedModel}
outputs:
- {name: Model, type: TensorflowLiteModel}
metadata:
annotations:
author: Alexey Volkov <alexey.volkov@ark-kun.com>
implementation:
container:
image: tensorflow/tensorflow:2.3.0
command:
- sh
- -exc
- |
model_path="$0"
output_model_path="$1"
mkdir -p "$(dirname "$output_model_path")"
tflite_convert --saved_model_dir "$model_path" --output_file "$output_model_path"
- {inputPath: Model}
- {outputPath: Model}

0 comments on commit 1802db3

Please sign in to comment.