FRIDA-transformed / check_input_dims.py
geologist387's picture
Added an onnx model
eef0ae4
raw
history blame contribute delete
567 Bytes
import onnxruntime as ort
session = ort.InferenceSession("onnx/frida-onnx/FRIDA.onnx")
for i, inp in enumerate(session.get_inputs()):
print(f"Input {i}:")
print(f" Name: {inp.name}")
print(f" Type: {inp.type}")
print(f" Shape: {inp.shape}")
print(f" Is dynamic? {'Yes' if -1 in inp.shape else 'No'}")
for i, out in enumerate(session.get_outputs()):
print(f"Output {i}:")
print(f" Name: {out.name}")
print(f" Type: {out.type}")
print(f" Shape: {out.shape}")
print(f" Is dynamic? {'Yes' if -1 in out.shape else 'No'}")