jpmml/jpmml-tensorflow

IllegalArgumentException in org.jpmml.tensorflow.EstimatorFactory

udeshika-sewwandi opened this issue · 1 comments

Hi @vruusmann ,

I have a tensorflow model which needs to be converted to a pmml. Once I tried that, an exception has thrown. The log is shown below.

INFO: Parsing SavedModel..
2018-07-13 12:28:56.752157: I tensorflow/cc/saved_model/loader.cc:242] Loading SavedModel with tags: { serve }; from: /Users/usewwandi/Desktop/model-9000
2018-07-13 12:28:56.760847: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA
2018-07-13 12:28:56.776248: I tensorflow/cc/saved_model/loader.cc:161] Restoring SavedModel bundle.
2018-07-13 12:29:01.599559: I tensorflow/cc/saved_model/loader.cc:196] Running LegacyInitOp on SavedModel bundle.
2018-07-13 12:29:01.610202: I tensorflow/cc/saved_model/loader.cc:291] SavedModel load for tags { serve }; Status: success. Took 4858059 microseconds.
Jul 13, 2018 12:29:01 PM org.jpmml.tensorflow.Main run
INFO: Parsed SavedModel in 5639 ms.
Jul 13, 2018 12:29:02 PM org.jpmml.tensorflow.Main run
INFO: Converting..
Jul 13, 2018 12:29:02 PM org.jpmml.tensorflow.Main run
SEVERE: Failed to convert
java.lang.IllegalArgumentException
at org.jpmml.tensorflow.EstimatorFactory.newEstimator(EstimatorFactory.java:58)
at org.jpmml.tensorflow.Main.run(Main.java:117)
at org.jpmml.tensorflow.Main.main(Main.java:90)

Exception in thread "main" java.lang.IllegalArgumentException
at org.jpmml.tensorflow.EstimatorFactory.newEstimator(EstimatorFactory.java:58)
at org.jpmml.tensorflow.Main.run(Main.java:117)
at org.jpmml.tensorflow.Main.main(Main.java:90)

My model has a variables directory and saved_model.pb file. Variables directory has two "variables.data-00000-of-00002" files and "variables.index" file. Is the model incorrect here?

Thank you.

By the way TextCNN algorithm was used to train the model. According to the guide it doesn't support that algorithm. Will it be not possible to convert this model using the jpmml-tensorflow library?