nnrl/nn/distributions/flows/abstract.py
def unpack(transforms):
        """Recursively unfold CompositeTransforms in a list."""
        result = []
        for trans in transforms:
            if isinstance(trans, CompositeTransform):
                result.extend(trans.unpack(trans.transforms))
            elif isinstance(trans, Transform):
                result += [ConditionalTransform(transform=trans)]
            else:
                result += [trans]
        return result
Recursively unfold CompositeTransforms in a list.
Recursively unfold CompositeTransforms in a list.
Recursively unfold CompositeTransforms in a list .
def unpack(transforms):
        result = []
        for trans in transforms:
            if isinstance(trans, CompositeTransform):
                result.extend(trans.unpack(trans.transforms))
            elif isinstance(trans, Transform):
                result += [ConditionalTransform(transform=trans)]
            else:
                result += [trans]
        return result
def unpack ( transforms ) : result = [ ] for trans in transforms : if isinstance ( trans , CompositeTransform ) : result . extend ( trans . unpack ( trans . transforms ) ) elif isinstance ( trans , Transform ) : result += [ ConditionalTransform ( transform = trans ) ] else : result += [ trans ] return result
Recursively unfold CompositeTransforms in a list.
Recursively unfold CompositeTransforms in a list .
"""Recursively unfold CompositeTransforms in a list."""
transforms