

def __init__(self, layers):
    stacked_blocks = []
    n_folds = len(layers[0])
    assert all([(len(layer) == n_folds) for layer in layers])
    for k in xrange(n_folds):
        this_blocks = []
        for (i, layer) in enumerate(layers):
            this_blocks.append(layer[k])
        this_stacked_blocks = StackedBlocks(this_blocks)
        stacked_blocks.append(this_stacked_blocks)
    self._folds = stacked_blocks

dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/cross_validation/blocks.py StackedBlocksCV.__init__/original