I was going through this implementation of Reinforcement learning where model is being trained to manage the number of bikes at a station.
Here, line 78 represents the loop over all episodes (if I understood correctly). In line 92, the DQN Agent is defined meaning after each episode, the agent will be reset to default parameters.
But shouldn't we define the model before the loop starts because the after each episode, won't all the previous learning be lost if we initialize the class object in each iteration? Am I misinterpreting anything?
train_operator
method on line 98, they pass number of episodes there. $\endgroup$