'Generator to iterator over the layers in the same
order as fprop'

def layers_fprop(self):

    for layer in self.layers:
        (yield layer)
        if hasattr(layer, 'layers_fprop'):
            for layer2 in layer.layers_fprop():
                (yield layer2)
