Model Importers
Three modules for importing models from external frameworks into SameDiff/DL4J format.
Modules
| Module | Input formats | Description |
|---|---|---|
kompile-model-importer-tensorflow | .pb, checkpoints | TensorFlow graph import via TensorFlowImporter |
kompile-model-importer-onnx | .onnx | ONNX model import via OnnxImporter |
kompile-model-importer-keras | .h5, .keras | Keras model import via KerasImporter (sequential and functional) |
Conversion process
- Importer reads the source format and builds a SameDiff/DL4J graph representation
- Model graph transformation and optimization
- Serialization to target format (
.fbfor SameDiff,.zipfor DL4J) - Optionally register in
ModelConstantsfor auto-download from the model catalog
Building
bash
# Build a specific importer
cd kompile-model-importer-onnx
mvn clean install -DskipTests
# Or build all importers as part of the full build
mvn clean install -DskipTestsThese modules are dependencies of kompile-cli for the kompile model convert command.