def get_conv_scale(convs):
    """
    Determines the downscaling performed by a sequence of convolutional and pooling layers
    """
    scale = 1.
    for c in convs:
        stride = getattr(c, 'stride', 1.)
        scale /= stride if isinstance(stride, (int, float)) else stride[0]
    return scale