Skip to content

Commit

Permalink
fix genome::runNetwork
Browse files Browse the repository at this point in the history
  • Loading branch information
abadiet committed Aug 27, 2023
1 parent 9d90326 commit 2a13da3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/PNEATM/genome.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,6 @@ void Genome<Types...>::runNetwork () {
node->reset (false);
}

// process output of input/bias nodes as we already know their input
for (NodeBase* node : optimize_nodes_process [0]) {
node->process ();
}

// recurent connections: we already know every input, so we don't care of layers
typename std::set<pneatm::Genome<Types...>::optimize_network_ope>::iterator it = optimize_operations_recu_waiting.begin ();
while (it != optimize_operations_recu_waiting.end () && it->conn_inNodeRecu <= N_runNetwork) {
Expand All @@ -748,6 +743,11 @@ void Genome<Types...>::runNetwork () {
);
}

// process output of input/bias nodes as we already know their input
for (NodeBase* node : optimize_nodes_process [0]) {
node->process ();
}

unsigned int lastLayer = nodes [nbBias + nbInput]->layer;
for (unsigned int ilayer = 0; ilayer <= lastLayer - 2; ilayer++) {
// non-recurrent connections: can depend on layers and so we processed them sequentially, layer per layer
Expand Down

0 comments on commit 2a13da3

Please sign in to comment.