def loss(self, **kwargs):
        regs = regularizers.from_kwargs(self, **kwargs)
        outputs, _ = self.build_graph(regs)
        return sum(l.weight * l(outputs) for l in self.losses) + \
            sum(r.weight * r.loss(self.layers, outputs) for r in regs)
Return a variable representing the regularized loss for this network.
dataset/ETHPy150Open lmjohns3/theanets/theanets/graph.py/Network.loss