fix bypassing_mtml crash
fix bypassing_mtml crash

Summary:
Currently if all samples in a batch miss labels, the task customized layers have no data.
In that case, the EnsureDense op does not compute the gradient correctly. To avoid that, we switch
back to let Gather to generate dense gradients.

why EnsureDense op does not compute the gradient correctly?
It is because when EnsureDense computes gradients, it does not know the actual data batch size. So its out gradients may have wrong batch size.

Reviewed By: xianjiec

Differential Revision: D4712463

fbshipit-source-id: 736f63273e7fbc4348f37fa3a5a696f855b7c3ad

sf-wind/caffe2,davinwang/caffe2,sf-wind/caffe2,xzturn/caffe2,bwasti/caffe2,sf-wind/caffe2,Yangqing/caffe2,xzturn/caffe2,Yangqing/caffe2,Yangqing/caffe2,bwasti/caffe2,bwasti/caffe2,sf-wind/caffe2,Yangqing/caffe2,xzturn/caffe2,xzturn/caffe2,davinwang/caffe2,caffe2/caffe2,davinwang/caffe2,bwasti/caffe2,pietern/caffe2,pietern/caffe2,Yangqing/caffe2,sf-wind/caffe2,pietern/caffe2,davinwang/caffe2,pietern/caffe2,bwasti/caffe2,davinwang/caffe2,pietern/caffe2,xzturn/caffe2