onnx / onnx/models

onnx.shape_inference.infer_shapes(SqueezeNet) not complete

Open
#133 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
9.8k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

I want to get inner node output to analyze onnx graph downloaded in https://github.com/onnx/models/tree/master/squeezenet. However, when I code as follow:

import onnx 
import onnx.shape_inference
onnx_model = onnx.load_model('squeezenet.onnx')
onnx_model = onnx.shape_inference.infer_shapes(onnx_model)
print onnx_model.graph.value_info

I only get the first node output, though the second node is just a relu op.
Could I solve this problem easily? Or I should write a shape_inference by my self ?

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the provided Python reproduction using onnx.shape_inference.infer_shapes and the SqueezeNet model from onnx/models. Compare the populated graph.value_info entries with the model's intermediate nodes and determine why inference stops after the first output. Done means the issue's missing inner-node outputs are consistently available after shape inference, with a regression check for SqueezeNet.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.