no_object_index = arm_object_conf <= self.objectness_thre
AttributeError: ‘FunctionBackward’ object has no attribute ‘objectness_thre’
解决方法:
首先在refinedet.py这个地方 if self.phase == “test”:
# print(loc, conf)
# output = self.detect.apply(
output = self.detect.forward( # 将apply改为forward
其次,在eval_refinedet.py的if name == ‘main’: 下面加上torch.set_grad_enabled(False)