You normally train the entire data set at the end of any wfo cycle. Check out the neural function in r.h - you'll need the same function, only calling Python code instead of R code.