static computePoolOutputShape(isGlobalOperator, inputDims, strides, kernelShape, pads, autoPad) {
        if (inputDims.length <= 0) {
            throw new Error('input shape must be of size greater than 0');
        }
        // Add batch size and number of channels of output
        const outputDims = [inputDims[0], inputDims[1]];
        // TODO: support dilations for pool operators
        const dilations = new Array(kernelShape.length).fill(1);
        PoolConvUtil.computeShapeHelper(isGlobalOperator, inputDims, outputDims, strides, dilations, kernelShape, pads, autoPad);
        return outputDims;
    }
/**
     * Calculate the output shape for Pool ops based on input attributes. (Should be used only for Pool ops)
     * @param isGlobalOperator If true, perform global pooling.
     * @param inputDims The input tensor dimension. (inputs[0].dims)
     * @param strides Stride along each axis.
     * @param kernelShape The size of the kernel along each axis.
     * @param pads Padding for the beginning and ending along each axis.
     * @param autoPad DEPRECATED attribute supported for legacy models. Specifies how to implicitly calculate pads in each
     *     dimension. Can take values NOTSET, SAME_UPPER, SAME_LOWER, or VALID.
     */
Calculate the output shape for Pool ops based on input attributes. (Should be used only for Pool ops)
@param isGlobalOperator If true, perform global pooling.
@param inputDims The input tensor dimension. (inputs[0].dims)
@param strides Stride along each axis.
@param kernelShape The size of the kernel along each axis.
@param pads Padding for the beginning and ending along each axis.
@param autoPad DEPRECATED attribute supported for legacy models. Specifies how to implicitly calculate pads in each
dimension. Can take values NOTSET, SAME_UPPER, SAME_LOWER, or VALID.
Calculate the output shape for Pool ops based on input attributes . ( Should be used only for Pool ops ) @param isGlobalOperator If true perform global pooling . @param inputDims The input tensor dimension . ( inputs [ 0 ] . dims ) @param strides Stride along each axis . @param kernelShape The size of the kernel along each axis . @param pads Padding for the beginning and ending along each axis . @param autoPad DEPRECATED attribute supported for legacy models . Specifies how to implicitly calculate pads in each dimension . Can take values NOTSET SAME_UPPER SAME_LOWER or VALID .
static computePoolOutputShape(isGlobalOperator, inputDims, strides, kernelShape, pads, autoPad) {
        if (inputDims.length <= 0) {
            throw new Error('input shape must be of size greater than 0');
        }
        const outputDims = [inputDims[0], inputDims[1]];
        const dilations = new Array(kernelShape.length).fill(1);
        PoolConvUtil.computeShapeHelper(isGlobalOperator, inputDims, outputDims, strides, dilations, kernelShape, pads, autoPad);
        return outputDims;
    }
static computePoolOutputShape ( isGlobalOperator , inputDims , strides , kernelShape , pads , autoPad ) { if ( inputDims . length <= 0 ) { throw new Error ( 'input shape must be of size greater than 0' ) ; } const outputDims = [ inputDims [ 0 ] , inputDims [ 1 ] ] ; const dilations = new Array ( kernelShape . length ) . fill ( 1 ) ; PoolConvUtil . computeShapeHelper ( isGlobalOperator , inputDims , outputDims , strides , dilations , kernelShape , pads , autoPad ) ; return outputDims ; }
Calculate the output shape for Pool ops based on input attributes.
Calculate the output shape for Pool ops based on input attributes .
// Add batch size and number of channels of output // TODO: support dilations for pool operators