def __init__(self, module, maxComplexity=None, **args): """ the default maxComplexity is the number of parameters in the module. """ Evolvable.__init__(self, module) if maxComplexity == None: self.maxComplexity = self.module.paramdim else: self.maxComplexity = maxComplexity self.randomize(**args)
def __init__(self, module, maxComplexity = None, **args): """ the default maxComplexity is the number of parameters in the module. """ Evolvable.__init__(self, module) if maxComplexity == None: self.maxComplexity = self.module.paramdim else: self.maxComplexity = maxComplexity self.randomize(**args)
def __init__(self, spokes=..., angle=0): Evolvable.__init__(self) self.spokeProjFrac = np.cos(2 * np.pi / 60) #print(self.spokeProjFrac) if spokes is ...: self.randomize() else: self.spokes = spokes self.sangle = angle self.spokes = np.clip(self.spokes, 0, 1)