function round(value, roundingMode) {
    if (!roundingMode) return Math.trunc(value);
    switch(roundingMode){
        case "round":
            // used for Caffe Conv
            return Math.round(value);
        case "ceil":
            // used for Caffe Pool
            return Math.ceil(value);
        case "floor":
            return Math.floor(value);
        default:
            throw new Error(`Unknown roundingMode ${roundingMode}`);
    }
}
Rounds a value depending on the rounding mode
@param value
@param roundingMode A string from: 'ceil', 'round', 'floor'. If none is
    provided, it will default to truncate.