Fixed variable name error in GPU training code. Now seems to work.