(convconfigs)
return scale, offset
Composes a lists of [(k, d, s, p)...] into a single total scale and
    offset that returns to the input coordinates.
Composes a lists of [(k, d, s, p)...] into a single total scale and
    offset that returns to the input coordinates.
Composes a lists of [ ( k d s p ) ... ] into a single total scale and offset that returns to the input coordinates .
def convconfig_scale_offset(convconfigs):
    '''Composes a lists of [(k, d, s, p)...] into a single total scale and
    offset that returns to the input coordinates.
    '''
    if len(convconfigs) == 0:
        return (1, 0)
    scale, offset = convconfig_scale_offset(convconfigs[1:])
    kernel, dilation, stride, padding = convconfigs[0]
    scale *= stride
    offset *= stride
    offset += (kernel - 1) * dilation / 2.0 - padding
    return scale, offset
def convconfig_scale_offset ( convconfigs ) : if len ( convconfigs ) == 0 : return ( 1 , 0 ) scale , offset = convconfig_scale_offset ( convconfigs [ 1 : ] ) kernel , dilation , stride , padding = convconfigs [ 0 ] scale *= stride offset *= stride offset += ( kernel - 1 ) * dilation / 2.0 - padding return scale , offset