add "update_by_batch" in genome;

add "normalized" gene, which can do normalization before activation func.
add related test.
This commit is contained in:
wls2002
2024-05-30 23:12:11 +08:00
parent 5bd6e5c357
commit 3ea9986bd4
6 changed files with 403 additions and 20 deletions

View File

@@ -39,6 +39,9 @@ class BaseGenome:
def transform(self, state, nodes, conns):
raise NotImplementedError
def restore(self, state, transformed):
raise NotImplementedError
def forward(self, state, inputs, transformed):
raise NotImplementedError
@@ -121,7 +124,7 @@ class BaseGenome:
return nodes, conns
def update_by_batch(self, state, batch_input, nodes, conns):
def update_by_batch(self, state, batch_input, transformed):
"""
Update the genome by a batch of data.
"""