TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

Polygraphy run results

Open oreo-lp opened this issue 3 years ago • 1 comments

Description

When I run polygraphy run --onnxrt ./my_onnx.onnx --save-inputs onnx_inputs.json to save the inputs data of my onnx model, I am very puzzled by this onnx_inputs.json

The content of onnx_inputs.json is: [ { "input":{ "array":"k05VTVBZAQB2AHsan" } } ] how to conver the value to float?

oreo-lp avatar Aug 02 '22 10:08 oreo-lp

You can load it like so:

from polygraphy.json import load_json

inputs = load_json("onnx_inputs.json")

then, inputs["array"] should be a NumPy array.

Another option is to use:

polygraphy inspect data onnx_inputs.json --show-values

on the command-line.

pranavm-nvidia avatar Aug 02 '22 13:08 pranavm-nvidia

Closing since no response for more than 3 weeks, please reopen if you still have question, thanks!

ttyio avatar Sep 19 '22 07:09 ttyio