def output_dim(self, X, S, padding, strides, pooling=False):
        """
        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
            pooling (bool): flag for setting pooling layer size
        """

        if self.check_caffe_compat() and pooling:
            size = int(ceil(float(X - S + 2 * padding)/strides)) + 1
            if padding > 0 and (size - 1)*strides >= X + padding:
                # decrement size if last pooling op is completely in padding
                size -= 1
        else:
            # normal neon output size determination
            size = (X - S + 2 * padding)/strides + 1

        if pooling and padding >= S:
            raise ValueError("Padding dim %d incompatible with filter size %d" % (padding, S))

        return size
dataset/ETHPy150Open NervanaSystems/neon/neon/backends/backend.py/Backend.output_dim/original