Open leah-at-lovelace opened 3 months ago
Yes i encountered the same error with a trained segmentation model ;(
It seems to have something to do with the preperation of the dual models outputs when in eval mode. Logically i tried to change the line to return (torch.cat([d[0], mc[1]], 1), (d[1], mc[1], p[1])), then the export works. But when using the onnx for inference, it does not produce 2 output tensors as expected but 4 and they are malformed. For now im falling back onto the gelan models that do work, including the export to onnx. :/ maybe someone smarter than me knows how to concat the resulting tensors correctly.
failed to export weight trained using train_dual too, any update on this? the dual model are more precise compared to the one trained using gelan š«”
same error!
Shouldn't it be (torch.cat([d[0], mc[0]], 1), (d[1], mc[1], p[1]))
?
I'm trying to convert yolov9-c-seg.pt to ONNX, using
export.py
, but I get the following error. Has anyone else hit this?One note is that I had to make a change to get
segment/predict.py
running. Afterpred, proto = model(im, augment=augment, visualize=visualize)[:2]
I addedproto = proto[2]
based on another issue I found here. Not sure it's relevant to my current error, but possibly.