Java library and command-line application for converting TensorFlow models to PMML.
- Supported Estimator types:
- Supported Feature column types:
- Production quality:
- Complete test coverage.
- Fully compliant with the JPMML-Evaluator library.
- Protocol Buffers 3.2.0 or newer
- TensorFlow 1.1.0 or newer
- Java 1.8 or newer
Enter the project root directory and build using Apache Maven; use the protoc.exe
system property to specify the location of the Protocol Buffers compiler:
mvn -Dprotoc.exe=/usr/local/bin/protoc clean install
The build produces an executable uber-JAR file target/converter-executable-1.0-SNAPSHOT.jar
.
A typical workflow can be summarized as follows:
- Use TensorFlow to train an estimator.
- Export the estimator in
SavedModel
data format to a directory in a local filesystem. - Use the JPMML-TensorFlow command-line converter application to turn the SavedModel directory to a PMML file.
Please see the test script file main.py for sample workflows.
Converting the estimator SavedModel directory estimator/
to a PMML file estimator.pmml
:
java -jar target/converter-executable-1.0-SNAPSHOT.jar --tf-savedmodel-input estimator/ --pmml-output estimator.pmml
Getting help:
java -jar target/converter-executable-1.0-SNAPSHOT.jar --help
JPMML-TensorFlow is licensed under the GNU Affero General Public License (AGPL) version 3.0. Other licenses are available on request.
Please contact [email protected]