Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

pooling3d operation for onnx


I have been trying to convert to a ONNX model to intermediate representation using model optimizer, and I have an error in the max pooling operation. This is the error: 
[ ERROR ]  operands could not be broadcast together with shapes (2,) (3,) 
looking in the model optimizer code I see that is a numpy error, in file line  116.

output_spatial_shape = np.array(rounding( np.array(input_spatial_shape + pad_spatial_shape - window_spatial_shape, dtype=np.float) / stride_spatial), dtype=np.int64) + 1

all variables sizes are 2 except pad_spatial_shape which is 3.

So my conclusion is that the class is developed to use MaxPooling2D and the Pytorch operation makes 3D max pooling.
After digging in the ONNX conversor from Pytorch I see that the pooling3D operation is transformed to pooling operation but with the 3 dimensions of the pooling (window_x, window_y, window_z). its like MaxPool(stride_x, stride_y,stride_z). 
But in the code of we see that is discarding this  z variable. 

I see that model optimizer can make custom operators.  But no for ONNX.

So, my questions are: 
Is it implemented 3D pooling in openvino model optimizer?
Are you going to add custom operation framework for ONNx files?
Thanks in advance. 

0 Kudos
0 Replies