Haha. yeah, I guess I copied code while I was in the middle of making changes. From what I can understand though you are absolutely right. It looks like the number of terms I was using let it start out with some pretty steep curves so the loss was astronomical. I fixed the problem by having fewer terms in the series and initializing parameters in such a way as to reduce the initial loss.
Thank you
Ethan