Recurrent inputs for `FeedForwardLayer`
Previously `FeedForwardLayers` would throw recursion errors when you plot their rate maps if any of the inputs were recurrent (or ultimately part of a recurrent loop) since the `get_state()` method would call the input layer, which would call the input layer, which would.... you get the idea.
This has been elegantly fixed by colleenjg. Flag an I put as recurrent when you add it and at rate map evaluation time specificy the recursion depth you want to go to.
Before
Env = Environment()
Ag = Agent(Env)
PCs = PlaceCells(Ag)
FFL = FeedForwardLayer(Ag)
FFL.add_input(PCs)
FFL.add_input(FFL) < a recurrent input!!!
FFL.plot_rate_map()
returns
RecursionError: maximum recursion depth exceeded in comparison
Now
Env = Environment()
Ag = Agent(Env)
PCs = PlaceCells(Ag)
FFL = FeedForwardLayer(Ag)
FFL.add_input(PCs)
FFL.add_input(FFL,recurrent=True) < a recurrent input, flag it as such!!!
FFL.plot_rate_map(max_recurrence=0) max number of times to pass through the recurrent input loop before then ignoring it
FFL.plot_rate_map(max_recurrence=1) 1 pass through the loop
FFL.plot_rate_map(max_recurrence=100) 100 passes
![3c783622-00fc-45df-95ae-0dc7e670a881](https://github.com/RatInABox-Lab/RatInABox/assets/41446693/13a4f343-9c08-43a0-9af5-52d60c387f88)
![de109171-be11-4b06-8828-e1f54d9af97c](https://github.com/RatInABox-Lab/RatInABox/assets/41446693/be86612e-f390-47b7-a215-fbb63e9d4593)
![3c483aba-bc6f-4728-ab7d-8b34833bdf5b](https://github.com/RatInABox-Lab/RatInABox/assets/41446693/5fe4fe38-887e-429d-9af2-40da427d5b6e)