def numConnects(self, layerName):
        """ Number of incoming weights, including bias. Assumes fully connected. """
        count = 0
        if self[layerName].active: 
            count += 1 # 1 = bias
            for connection in self.connections:
                if connection.active and connection.fromLayer.active and connection.toLayer.name == layerName:
                    count += connection.fromLayer.size
        return count
def numConnects ( self , layerName ) : count = 0 if self [ layerName ] . active : count += 1 for connection in self . connections : if connection . active and connection . fromLayer . active and connection . toLayer . name == layerName : count += connection . fromLayer . size return count
Number of incoming weights, including bias. Assumes fully connected.