tensorflow / tensorflow/models

[Help] Run inference without box decoder and the preprocessor

Open
#10,527 0 comments 0 reactions 3 assignees View on GitHub

Nobody has claimed this yet.

models:research:odapi type:support
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

Hi,
I am trying to compare the ONNX predictions vs original model predictions. The main problem for me is that I need only the cut version of ONNX model and that is why I need to run the partial inference.
In Tensorflow v1 it was possible to get tensor by name, so doing the inference in the intermediate layers was easier but I don't understand how to do it in hee.

Below I attach the ONNX generation script. How can I do the equivalent inference with saved_model in TensorFlow for this part of the graph (without box decoder and the preprocessor)?

python -m tf2onnx.convert --opset 12 --output "./model.onnx" --saved-model ./saved_model --inputs-as-nchw "StatefulPartitionedCall/Preprocessor/stack:0" --inputs "StatefulPartitionedCall/Preprocessor/stack:0[1,640,640,3]" --outputs StatefulPartitionedCall/concat_1:0,StatefulPartitionedCall/concat:0

Would be very grateful for any help,
Best Regards

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.