jpmml / jpmml-tensorflow

Java library and command-line application for converting TensorFlow models to PMML
GNU Affero General Public License v3.0
75 stars 27 forks source link

tensorflow convert the pmml exception #7

Closed lijunyong closed 6 years ago

lijunyong commented 6 years ago
root@main:/opt# java -jar converter-executable-1.0-SNAPSHOT.jar --tf-savedmodel-input model/ --pmml-output estimator.pmml
Mar 12, 2018 9:35:02 AM org.jpmml.tensorflow.Main run
INFO: Parsing SavedModel..
2018-03-12 09:35:02.866322: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2018-03-12 09:35:02.866705: I tensorflow/cc/saved_model/loader.cc:289] SavedModel load for tags { serve }; Status: fail. Took 24 microseconds.
Mar 12, 2018 9:35:02 AM org.jpmml.tensorflow.Main run
SEVERE: Failed to parse SavedModel
org.tensorflow.TensorFlowException: SavedModel not found in export directory: /opt/model
    at org.tensorflow.SavedModelBundle.load(Native Method)
    at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:39)
    at org.jpmml.tensorflow.Main.run(Main.java:100)
    at org.jpmml.tensorflow.Main.main(Main.java:90)

Exception in thread "main" org.tensorflow.TensorFlowException: SavedModel not found in export directory: /opt/model
    at org.tensorflow.SavedModelBundle.load(Native Method)
    at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:39)
    at org.jpmml.tensorflow.Main.run(Main.java:100)
    at org.jpmml.tensorflow.Main.main(Main.java:90)
vruusmann commented 6 years ago

Exception in thread "main" org.tensorflow.TensorFlowException: SavedModel not found in export directory: /opt/model

This is a generic FileNotFoundException. Your TensorFlow model is not located in /opt/model, it is located someplace else.

I don't know how your computer's filesystem is laid out, so I can't help.

lijunyong commented 6 years ago

@vruusmann my os system is ubuntu 16.04

root@main:/opt/model# pwd
/opt/model
root@main:/opt/model# ls
checkpoint                             mnist_model-26001.data-00000-of-00001  mnist_model-27001.index                mnist_model-28001.meta
mnist_model-25001.data-00000-of-00001  mnist_model-26001.index                mnist_model-27001.meta                 mnist_model-29001.data-00000-of-00001
mnist_model-25001.index                mnist_model-26001.meta                 mnist_model-28001.data-00000-of-00001  mnist_model-29001.index
mnist_model-25001.meta                 mnist_model-27001.data-00000-of-00001  mnist_model-28001.index                mnist_model-29001.meta
root@main:/opt/model#