erik
I am a bit confused about the approach here:
https://github.com/luxonis/depthai-experiments/blob/master/gen2-custom-models/generate_model/pytorch_diff.py#L17
# Define the expected input shape (dummy input)
shape = (3, 720, 720)
X = torch.ones(shape, dtype=torch.float32)
path = Path("out/")
path.mkdir(parents=True, exist_ok=True)
onnx_file = "out/diff.onnx"
print(f"Writing to {onnx_file}")
torch.onnx.export(
Model(),
(X, X),
onnx_file,
opset_version=12,
do_constant_folding=True,
input_names = ['img1', 'img2'], # Optional
output_names = ['output'], # Optional
)
and how it compares to:
why is one example (X, X) and one is (X, X, X)?