Skip to content

Commit

Permalink
feat(components): Added converters to OnnxModel from Tensorflow and K…
Browse files Browse the repository at this point in the history
…eras (#4550)
  • Loading branch information
Ark-kun authored Sep 29, 2020
1 parent 2471f26 commit 4ec84e6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: To ONNX from Keras HDF5 model
inputs:
- {name: Model, type: KerasModelHdf5}
outputs:
- {name: Model, type: OnnxModel}
metadata:
annotations:
author: Alexey Volkov <alexey.volkov@ark-kun.com>
implementation:
container:
image: tensorflow/tensorflow:2.3.0
command:
- sh
- -exc
- python3 -m pip install tf2onnx==1.6.3 && "$0" "$@"
- python3
- -m
- tf2onnx.convert
- --keras
- {inputPath: Model}
- --output
- {outputPath: Model}
- --fold_const
- --verbose
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: To ONNX from Tensorflow SavedModel
inputs:
- {name: Model, type: TensorflowSavedModel}
outputs:
- {name: Model, type: OnnxModel}
metadata:
annotations:
author: Alexey Volkov <alexey.volkov@ark-kun.com>
implementation:
container:
image: tensorflow/tensorflow:2.3.0
command:
- sh
- -exc
- python3 -m pip install tf2onnx==1.6.3 && "$0" "$@"
- python3
- -m
- tf2onnx.convert
- --saved-model
- {inputPath: Model}
- --output
- {outputPath: Model}
- --fold_const
- --verbose

0 comments on commit 4ec84e6

Please sign in to comment.