refactor folder locations

This commit is contained in:
root
2024-07-10 16:40:03 +08:00
parent 3170d2a3d5
commit 4cdac932d3
25 changed files with 0 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
import jax, jax.numpy as jnp
from .. import BaseGene
class BaseNodeGene(BaseGene):
"Base class for node genes."
fixed_attrs = ["index"]
def __init__(self):
super().__init__()
def forward(self, state, attrs, inputs, is_output_node=False):
raise NotImplementedError
def repr(self, state, node, precision=2, idx_width=3, func_width=8):
idx = node[0]
idx = int(idx)
return "{}(idx={:<{idx_width}})".format(
self.__class__.__name__, idx, idx_width=idx_width
)
def to_dict(self, state, node):
idx = node[0]
return {
"idx": int(idx),
}
def sympy_func(self, state, node_dict, inputs, is_output_node=False):
raise NotImplementedError