def output_dim(X, S, padding, strides):
    """
    compute along 1 dimension, with these sizes, what will be the output dimension

    Arguments:
        X (int): input data dimension
        S (int): filter dimension
        padding (int): padding on each side
        strides (int): striding
    """
    return (X - S + 2 * padding)/strides + 1