There’s one problem with your training loop, but it shouldn’t affect correctness. Don’t do train_loss += loss, because you’ll be keeping graphs for each iteration around. Do train_loss += loss.data[0], so that you only accumulate the value, not the Variable that records each iteration.
The project is quite large so I’m afraid I won’t be able to help you. There’s probably a bug somewhere. Maybe this example 54 could help you somehow.