add "update_by_batch" in genome;
add "normalized" gene, which can do normalization before activation func. add related test.
This commit is contained in:
@@ -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.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user