Try adding .contiguous() right after the place where you slice the tensor.
rois_ = rois[inds, :].contiguous()

...

rois_expand_ = rois_expand[inds, :].contiguous()

It seems if your pytorch version is higher enough, noncontigous tensor can also be back-propagated for some operations.