(modulelist)
return list(zip(*result))
Converts a list of modules to a pair of lists of
    [(kernel_size, dilation, stride, padding)...]: one for x, and one for y.
Converts a list of modules to a pair of lists of
    [(kernel_size, dilation, stride, padding)...]: one for x, and one for y.
Converts a list of modules to a pair of lists of [ ( kernel_size dilation stride padding ) ... ] : one for x and one for y .
def convconfigs(modulelist):
    '''Converts a list of modules to a pair of lists of
    [(kernel_size, dilation, stride, padding)...]: one for x, and one for y.'''
    result = []
    for module in modulelist:
        settings = tuple(getattr(module, n, d)
            for n, d in (('kernel_size', 1),
                ('dilation', 1), ('stride', 1), ('padding', 0)))
        settings = tuple((s if isinstance(s, tuple) else (s, s))
            for s in settings)
        if settings != ((1, 1), (1, 1), (1, 1), (0, 0)):
            result.append(zip(*settings))
    return list(zip(*result))
def convconfigs ( modulelist ) : result = [ ] for module in modulelist : settings = tuple ( getattr ( module , n , d ) for n , d in ( ( 'kernel_size' , 1 ) , ( 'dilation' , 1 ) , ( 'stride' , 1 ) , ( 'padding' , 0 ) ) ) settings = tuple ( ( s if isinstance ( s , tuple ) else ( s , s ) ) for s in settings ) if settings != ( ( 1 , 1 ) , ( 1 , 1 ) , ( 1 , 1 ) , ( 0 , 0 ) ) : result . append ( zip ( * settings ) ) return list ( zip ( * result ) )