I have been trying to translate tensorflow models (xxx.pbtxt) into MHLO file (xxx-mhlo.mlir).

for inference, the model graph is weight frozen, and always only Forward pass, with a obvious output node like sigmoid or softmax, take lenet as a example, the command is as following:

tf-mlir-translate -graphdef-to-mlir -tf-enable-shape-inference-on-import=false lenet-infer.pbtxt -tf-input-arrays=input0 -tf-input-data-types=DT_FLOAT -tf-input-shapes=16,784

-tf-output-arrays=softmax0

-o 2lenet.mlir

the infer model achieves the expected results.

for training, the model graph is always Forward pass and Backward pass, and without a obvious output node, like loss or traing_op or optimizer or summary, which op should i set as a output node?

tf-mlir-translate -graphdef-to-mlir -tf-enable-shape-inference-on-import=false lenet-train.pbtxt -tf-input-arrays=input0,label -tf-input-data-types=DT_FLOAT,DT_FLOAT -tf-input-shapes=16,784:16,10

-tf-output-arrays=???

-o 2lenet.mlir

which node should i set as a tf-output-array?