OxViz Support page

Find answers to frequently asked questions or send me an email

Frequently Asked Questions

Shape/type info for intermediate edges missing.

The model needs to be exported including the edge shape information, there are many ways to do this depending on framework, some examples:

#-----------------------
#Method 1: python
import onnx
from onnx import shape_inference

model = onnx.load("model.onnx")
inferred = shape_inference.infer_shapes(model, data_prop=True)
onnx.save(inferred, "model_with_shapes.onnx")

#-----------------------
#Method 2: onnx-cli
pip install onnxcli
onnx infershape model.onnx model_with_shapes.onnx

#-----------------------
#Method 3: ssi4onnx
pip install ssi4onnx
ssi4onnx --input_onnx_file_path model.onnx --output_onnx_file_path model_with_shapes.onnx

#-----------------------
#Method 4 native pytorch
torch.onnx.export(
    model, dummy_input, "model.onnx",
    do_constant_folding=True,   # also helps resolve static shapes
)
# Then immediately run inference on the saved file
import onnx
from onnx import shape_inference
m = shape_inference.infer_shapes(onnx.load("model.onnx"), data_prop=True)
onnx.save(m, "model.onnx")
                
Note that in some cases (for example with data dependent shapes, control flow with mismatched branch shapes and custom ops) exporting the shape data simply isnt possible.

The app crashes when I upload a valid onnx file!

Send me an email.

How is the graph layed out? How is the placement of nodes calculated?

OxViz uses Dagre (https://github.com/dagrejs/dagre), a javascript directed graph layout library. Its MIT license copy:

Copyright (c) 2012-2014 Chris Pettitt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
                
             

Still Have Questions?

I try to respond to emails the same day, but this is sometimes not possible (in part due to timezones).

Contact me