Option tf-mlir-translate --savedmodel-objectgraph-to-mlir

Hello,

I am trying to print the protobuf of a SavedModel as MLIR code without inlining the weights, just like tf-mlir-translate mygraph.pbtxt --graphdef-to-splatted-mlir does with (not trained) graphdefs. I assume that tf-mlir-translate [mydir] --savedmodel-objectgraph-to-mlir can do that. Am I right ?

But when I use tf-mlir-translate [mydir] --savedmodel-objectgraph-to-mlir --tf-savedmodel-exported-names=[name], I have a precondition error : tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate.cc:167] SavedModel import failed: FAILED_PRECONDITION: Could not restore saved variable: Adam/dense/kernel/m

In the other hand, tf-mlir-translate [mydir] --savedmodel-signaturedefs-to-mlir works well (but prints the MLIR code with weights already inlined).

Do you know what I am doing wrong ?

Regards

1 Like