def compute_image_size(args):
    """Computes resulting image size after a convolutional layer
    i=input channel, o=output channel, k = kernel size, s = stride, p = padding, d = dilation
    old_size = size of input image,
    new_size= size of output image.
    """
    old_size, i, o, k, s, p, d = args
    new_size = int((old_size + 2 * p - d * (k - 1) - 1) // s) + 1
    return new_size