运行Faster rcnn FPN网络,出现的bug:
RuntimeError: reciprocal 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
ref:https://blog.csdn.net/qq_43088746/article/details/100422779