Temporary fix for epoch x offset.
Merge branch 'fix_epoch' into gradient