def init_regularization(self): l1 = 0 l2 = 0 for w in self.weights: l1 += T.sum(abs(w)) l2 += T.sum(w ** 2) # l2 = T.sqrt(l2) return l1, l2
def init_regularization(self): l1 = 0 l2 = 0 for layer in self.weighted_layers: w = layer.w l1 += T.sum(abs(w)) l2 += T.sum(w**2) # l2 = T.sqrt(l2) return l1, l2
def init_regularization(self): l1 = 0 l2 = 0 for layer in self.weighted_layers: w = layer.w l1 += T.sum(abs(w)) l2 += T.sum(w ** 2) # l2 = T.sqrt(l2) return l1, l2