RuntimeError: reciprocal is not implemented for type torch.cuda.LongTensor

Bug:
RuntimeError: nice is not implemented for type Torch. CUDA. Longtensor
Anchor_target_layer_fpn.py “, line 136:

 			num_examples = torch.sum(labels[i] >= 0)
            num_examples = num_examples.float() 
            positive_weights = 1.0/num_examples
            negative_weights = 1.0/num_examples

Read More: