Closed marxav closed 6 years ago
@marxav you're right. Training on batches could speed up the process and result in stable convergence as well.
yup. will do that someday if it is possible without hurting readability. I chose one by one update because it fits the purpose of the demonstration.
First, thank you for this wonderful code.
In the
replay
function, there is onemodel.fit(state, target_f)
per sample in the minibach (i.e. if there are 32 samples, then there are 32fit
).I think all samples of the minibatch could be used in a single update with one single
train_on_batch(states, targets_f)
, which would speed up the processing time.