def compute_loss(self, Y): return functions_loss.loss(self.loss, self.get_Afinal(), Y)
def compute_loss(self, Y): Loss = functions_loss.loss(self.loss, self.get_Afinal(), Y) for layer in range(self.nlayer): Loss += self.info[layer]["lambda"] * np.sum( np.square(self.get_param(layer, "param", "W"))) return Loss