refactor genome.py use (C, 4) to replace (2, N, N) to represent connections

use "cons" to replace "connections" in code for beauty
This commit is contained in:
wls2002
2023-05-11 19:49:19 +08:00
parent e2a5117554
commit e5fc1167d9
3 changed files with 94 additions and 95 deletions

View File

@@ -1,5 +1,11 @@
import jax.numpy as jnp
import numpy as np
EMPTY_NODE = jnp.full((1, 5), jnp.nan)
# 输入
a = np.array([1, 2, 3, 4])
b = np.array([5, 6])
print(EMPTY_NODE)
# 创建一个网格,其中包含所有可能的组合
aa, bb = np.meshgrid(a, b)
aa = aa.flatten()
bb = bb.flatten()
print(aa, bb)