NoduleNet icon indicating copy to clipboard operation
NoduleNet copied to clipboard

AttributeError: 'NoduleNet' object has no attribute 'rcnn_logits'

Open nengwp opened this issue 4 years ago • 4 comments

An error occurred when I ran the python test.py eval command. The error seems to be caused by the network module. Can you try to explain it?

nengwp avatar Nov 06 '20 10:11 nengwp

AttributeError: 'NoduleNet' object has no attribute 'rcnn_logits' I have the same problem, did you solve that?

dayan2020 avatar Mar 13 '21 07:03 dayan2020

@nengwp

dayan2020 avatar Mar 13 '21 07:03 dayan2020

I'm glad you could tell me that you encountered a similar bug and I fixed the problem. The problem is caused by too few test results (0). Please make sure your input is wrong.

nengwp avatar Mar 13 '21 07:03 nengwp

the reason is rpn_proposals is none, you should do tab in eval model, example:

if self.use_rcnn:
    if len(self.rpn_proposals) > 0:
        rcnn_crops = self.rcnn_crop(feat_4, inputs, self.rpn_proposals)
        self.rcnn_logits, self.rcnn_deltas = data_parallel(self.rcnn_head, rcnn_crops)
        self.detections, self.keeps = rcnn_nms(self.cfg, self.mode, inputs, self.rpn_proposals, 
                                                                self.rcnn_logits, self.rcnn_deltas)
# add a table
        if self.mode in ['eval']:
            # Ensemble
            fpr_res = get_probability(self.cfg, self.mode, inputs, self.rpn_proposals,  self.rcnn_logits, self.rcnn_deltas)
            self.ensemble_proposals[:, 1] = (self.ensemble_proposals[:, 1] + fpr_res[:, 0]) / 2

QianLingjun avatar Oct 11 '22 01:10 QianLingjun