I’m sorry if this is a naive question, but when I try to import the bert_mrpc_frozen.pb model with
TensorflowFrameworkImporter tensorflowFrameworkImporter = new TensorflowFrameworkImporter();
SameDiff sd = tensorflowFrameworkImporter.runImport(frozenBertPB.getAbsolutePath(), Collections.emptyMap());
I get the following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.nd4j.samediff.frameworkimport.tensorflow.importer.TensorflowFrameworkImporter.importFromGraph(TensorflowFrameworkImporter.kt:58)
at org.nd4j.samediff.frameworkimport.tensorflow.importer.TensorflowFrameworkImporter.runImport(TensorflowFrameworkImporter.kt:64)
at pt.ipb.erisk.data.bert.EriskBertTrainer.main(EriskBertTrainer.java:41)
Caused by: java.lang.IllegalArgumentException: Unable to find name dataType for op name: "tensorarrayv3"
argDescriptor {
name: "outputs"
argType: OUTPUT_TENSOR
}
.name
at org.nd4j.samediff.frameworkimport.rule.attribute.BaseAttributeExtractionRule.argDescriptorTypesForOutputName(BaseAttributeExtractionRule.kt:153)
at org.nd4j.samediff.frameworkimport.process.AbstractMappingProcess.<init>(AbstractMappingProcess.kt:105)
at org.nd4j.samediff.frameworkimport.tensorflow.process.TensorflowMappingProcess.<init>(TensorflowMappingProcess.kt:49)
at org.nd4j.samediff.frameworkimport.tensorflow.process.TensorflowMappingProcess.<init>(TensorflowMappingProcess.kt:48)
at org.nd4j.samediff.frameworkimport.tensorflow.definitions.TensorflowOpDeclarationsKt.<clinit>(TensorflowOpDeclarations.kt:526)
... 3 more
I do have the files nd4j-op-def.pbtxt, tensorflow-mapping-ruleset.pbtxt and tensorflow-op-def.pbtxt in the src/main/resources dir… what am I doing wrong?
Caused by: java.lang.UnsatisfiedLinkError: Could not find jniopenblas_nolapack in class, module, and library paths.
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1705)
... 37 more
And in Linux x86_64:
Caused by: java.lang.UnsatisfiedLinkError: Could not find jnind4jcpu in class, module, and library paths.
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1705)
... 31 more
I cannot find the dependencies that would solve this missing libraries…
@agibsonccc, the only way to get jnind4jcpu (or other backend - also tried cuda) is through the -platform?
I cannot find any other alternative in the snapshots repository… if it is out of sync it becomes impossible to download the dependencies, doesn’t it?
Sorry we just updated the site there. Sonatype is migrating all open source projects (not just us) to this new URL. I’ll make sure to update the docs. Could you please try again?
Thank you, @agibsonccc. Almost there!
I believe that only the windows native library is available. Is there any way to “force” to use previous version of the linux or macOS?