Performs an N-D pooling operation similarly to the description in the TF

documentation:

https://www.tensorflow.org/api_docs/python/tf/nn/pool

Different from the description, this operation doesn't perform on batch and

channel. It only takes tensors of rank `N`.

output[x[0], ..., x[N-1]] = REDUCE_{z[0], ..., z[N-1]} input[ x[0] * strides[0] - pad_before[0] + dilation_rate[0]*z[0], ... x[N-1]*strides[N-1] - pad_before[N-1] + dilation_rate[N-1]*z[N-1] ],

The required optional arguments are:

- strides: an i64 array specifying the stride (i.e. step) for window loops.
- dilations: an i64 array specifying the filter upsampling/input downsampling rate
- padding: an i64 array of pairs (low, high) specifying the number of elements to pad along a dimension.

If strides or dilations attributes are missing then the default value is

one for each of the input dimensions. Similarly, padding values are zero

for both low and high in each of the dimensions, if not specified.