hallvardnmbu / neurons

Modular neural networks from scratch, in Rust.
https://crates.io/crates/neurons
GNU General Public License v3.0
5 stars 1 forks source link

Feedback connections #4

Open hallvardnmbu opened 1 month ago

hallvardnmbu commented 1 month ago

Outputs of layer i is fed back to prior layer j as "new" inputs.

hallvardnmbu commented 1 month ago

Initial sketch of feedback logic.

feedback

Should outputs after looping be summed up or concatenated? Or should the looped results be used directly?

hallvardnmbu commented 4 weeks ago

First initial experiment; iris dataset, commit: c6b735c4a09f2b958141427779890f0d52d0bafa. Faster convergence. Single-layer feedback. Looks promising.

hallvardnmbu commented 3 weeks ago

Allow feedback connections between output i to j if i's neurons (shape) is greater than or equal to j's.

Currently only works for layer[i].outputs == layer[j].inputs.

hallvardnmbu commented 3 weeks ago

Include learnable weight for the feedback connection? I.e.;

A -> B -> C
^    |
|_fw_|

where fw is a separate "layer".

Implementing this could prove useful, because then the shapes of i and j (previous comment) does not matter, as the feedback-layer projects to correct shape.

hallvardnmbu commented 1 day ago

Try out combining "original" input with the fed-back input. See article on loopy neural nets.