

def __init__(self, layers, loss):
    self.layers = layers
    self.loss = loss
    self.bprop_until = next((layers for (idx, l) in enumerate(self.layers) if isinstance(l, ParamMixin)), 0)
    self.layers[self.bprop_until].bprop_to_x = False
    self.collection = self.layers
    self._initialized = False

dataset/ETHPy150Open andersbll/deeppy/deeppy/feedforward/neural_network.py NeuralNetwork.__init__/VarMisuse@33/38 `idx`->`layers`