Open Baiyuetribe opened 2 years ago
grid_sample
is supported in onnx opset 16, which you can currently only have if you compile pytorch. Pytorch 1.11 can only do up to opset 15. It will be available in the next pytorch release. Even when I removed grid_sample
I enountered problems in exporting to onnx though.
Welcome anyone to contribute to this project, including conversion methods for onnx. I will also consider this conversion later.
Exporting to onnx with opset 16 seems to work if I comment out these lines:
#img0_ = resize(img0, scale_factor=scale_factor)
#img1_ = resize(img1, scale_factor=scale_factor)
#up_flow0_1 = resize(up_flow0_1, scale_factor=(1.0/scale_factor)) * (1.0/scale_factor)
#up_flow1_1 = resize(up_flow1_1, scale_factor=(1.0/scale_factor)) * (1.0/scale_factor)
#up_mask_1 = resize(up_mask_1, scale_factor=(1.0/scale_factor))
#up_res_1 = resize(up_res_1, scale_factor=(1.0/scale_factor))
The error seems to be related to the resize function.
@styler00dollar does export onnx work in 2023?
The project is awesome, one of the few projects that can run demos properly,Request to add conversion methods for onnx