Let me make sure I asked the question clearly - I did notice my code got truncated so I justed add to the end.
If I run that full code, I get an average loss on the last epoch of 387.385345 on my machine. If I rerun it all again I get the same answer. If I restart the kernel and re-run again I get the same answer. So, it seems to be reproducible which was what I was hoping to figure out how to do.
However if I restart the kernel and run the whole code again I get 387.385345 for the last epoch. BUT if I then run only block #2 without first running block #1, the result changes. I cant figure out what needs to rerun in block #1 to get the same result.