I'm working on a Unet model and the upsampling layers will trigger an exception when infering on an image with a different size than the training dataset: Inconsistent shape for ConcatLayer in function 'cv::dnn::ConcatLayerImpl::getMemoryShapes'
When exporting to onnx opset 9, inference work for any input size. The upsampling layer is defined as Upsample

When exporting to onnx opset >9, inference work on 256² only. The upsampling layer is defined as Resize

I can provide both onnx by email if needed