fix for pytorch1.7
fix for pytorch1.7

Reviewed By: alexander-kirillov, bowenc0221

Differential Revision: D30215015

fbshipit-source-id: 90c6a791c23f4edacdc7e7a95b41586582e8da93

facebookresearch/detectron2,facebookresearch/detectron2,facebookresearch/detectron2