static calcReduceShape(dims, axes, keepDims) {
        const outputDims = dims.slice();
        for (let i = 0; i < axes.length; i++) {
            if (keepDims) {
                outputDims[axes[i]] = 1;
            }
            else {
                outputDims[axes[i]] = 0;
            }
        }
        return outputDims.filter(dim => dim !== 0);
    }
/**
     * Calculate the expected shape of a reduce operation
     * @param dims The input tensor dimension
     * @param axes The dimensions along which the Tensor will be reduced
     * @param keepdims If set to true, the axes which are reduced are left in the
     *    result as dimensions with size one.
     */
Calculate the expected shape of a reduce operation
@param dims The input tensor dimension
@param axes The dimensions along which the Tensor will be reduced
@param keepdims If set to true, the axes which are reduced are left in the
result as dimensions with size one.
Calculate the expected shape of a reduce operation @param dims The input tensor dimension @param axes The dimensions along which the Tensor will be reduced @param keepdims If set to true the axes which are reduced are left in the result as dimensions with size one .
static calcReduceShape(dims, axes, keepDims) {
        const outputDims = dims.slice();
        for (let i = 0; i < axes.length; i++) {
            if (keepDims) {
                outputDims[axes[i]] = 1;
            }
            else {
                outputDims[axes[i]] = 0;
            }
        }
        return outputDims.filter(dim => dim !== 0);
    }
static calcReduceShape ( dims , axes , keepDims ) { const outputDims = dims . slice ( ) ; for ( let i = 0 ; i < axes . length ; i ++ ) { if ( keepDims ) { outputDims [ axes [ i ] ] = 1 ; } else { outputDims [ axes [ i ] ] = 0 ; } } return outputDims . filter ( dim => dim !== 0 ) ; }
Calculate the expected shape of a reduce operation
 @param dims The input tensor dimension
 @param axes The dimensions along which the Tensor will be reduced
 @param keepdims If set to true, the axes which are reduced are left in the
    result as dimensions with size one.
Calculate the expected shape of a reduce operation @param dims The input tensor dimension @param axes The dimensions along which the Tensor will be reduced @param keepdims If set to true the axes which are reduced are left in the result as dimensions with size one .