Display averaged loss over the last several iterations
fix warning
Merge pull request #1096 from qipeng/smoothed-cost

Display averaged loss over the last several iterations