def build_graph(self, regularizers=()):
        key = self._hash(regularizers)
        if key not in self._graphs:
            logging.info('building computation graph')
            for loss in self.losses:
                loss.log()
            for reg in regularizers:
                reg.log()
            outputs = {}
            updates = []
            for layer in self.layers:
                out, upd = layer.connect(outputs)
                for reg in regularizers:
                    reg.modify_graph(out)
                outputs.update(out)
                updates.extend(upd)
            self._graphs[key] = outputs, updates
        return self._graphs[key]
Connect the layers in this network to form a computation graph.
dataset/ETHPy150Open lmjohns3/theanets/theanets/graph.py/Network.build_graph