tom:

bug in python 3.5 weakref


Thanks a lot, Tom!
According to your suggestion, in order to get code running, I switched to python 2.7, and it trains without error!  and it works for python 3.6 too. I am testing on python3.5 after conda update python. Now it seems they all work without error when training like above.
Thanks again!