add training cost to the periodical perf report while doing sgd