just for future reference, and for whoever else looks over this question. I decided to use a pickel file to store the weights as the network was being trained. It was simpler, since i needed to load the weights in another file that I was using. but thank you very much for your help