mbrookhart commented on a change in pull request #9475:
URL: https://github.com/apache/tvm/pull/9475#discussion_r749686392
##########
File path: src/relay/op/image/resize.cc
##########
@@ -215,6 +225,8 @@ bool Resize3DRel(const Array<Type>& types, int num_inputs,
const Attrs& attrs,
const Resize3DAttrs* param = attrs.as<Resize3DAttrs>();
ICHECK(param != nullptr);
+ ICHECK(param->size.size() == 3);
+ ICHECK(param->roi.size() == 10);
Review comment:
> I think it is better to remove roi for batch and channel dims in the
frontend (similar to how out_size is handled) and require param->roi.size() ==
6 here for better clarity and removing the need for dealing with roi layout in
topi.
That makes sense, I'll work on that.
> I remember the folklore of ONNX being tied to NCHW layout, but I don't
find the official statement of that convention in the spec.
Convolution definitely has to be NCHW.
https://github.com/onnx/onnx/blob/master/docs/Operators.md#inputs-2---3
The documentation isn't as expilict about it with Resize, but I haven't
found a test or an example of anything else.
I'm looking at the code. Nearest neighbor appears to go over all axes:
https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/core/providers/cpu/tensor/upsample.cc#L136-L254
But bilinear is only supporting NCHW:
https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/core/providers/cpu/tensor/upsample.cc#L1069-L1075
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]