Fix dummy batch logic in trainer (#1890)
Fix dummy batch logic in trainer (#1890)

Summary:
We want to wait until `sample_size` is a float before applying dummy batch logic.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/1890

Reviewed By: ngoyal2707

Differential Revision: D20596505

Pulled By: myleott

fbshipit-source-id: 11610344f794c9abe3c68e4f8fb4dbf16b58782c

pytorch/fairseq,pytorch/fairseq,pytorch/fairseq