create function_factory.py, use to manage functions

This commit is contained in:
wls2002
2023-05-09 01:49:43 +08:00
parent ee6bb01eff
commit f63a0c447b
7 changed files with 231 additions and 18 deletions

View File

@@ -33,9 +33,6 @@ def create_distance_function(N, config, type: str, debug: bool = False):
else:
return res_func
# return lambda nodes1, connections1, nodes2, connections2: \
# distance_numpy(nodes1, connections1, nodes2, connections2, disjoint_coe, compatibility_coe)
elif type == 'o2m':
vmap_func = vmap(distance_with_args, in_axes=(None, None, 0, 0))
pop_size = config.neat.population.pop_size