In file data.py , the shapes of proj_labdel and proj_weight are (out_height, out_width, self.num_class, 2) initially. After proj_label = np.expand_dims(proj_label, axis=0) and proj_weight = np.expand_dims(proj_weight, axis=0) , it should be (1, out_height, out_width, self.num_class, 2) .
In the evaluation part of file solver.py , the shape of the ouptput of proj_regression_loss layer is (1, out_height, out_width, 20) . You directly feed proj_label , proj_weight and that output to function smoothl1_metric. Then you traverse the data through size = label.shape[0]. I wonder that you might have flatted the data somewhere, or the value of size should be 1.
Could you please explain this to me? @YunzhuLi
In file
data.py, the shapes ofproj_labdelandproj_weightare(out_height, out_width, self.num_class, 2)initially. Afterproj_label = np.expand_dims(proj_label, axis=0)andproj_weight = np.expand_dims(proj_weight, axis=0), it should be(1, out_height, out_width, self.num_class, 2).In the evaluation part of file
solver.py, the shape of the ouptput ofproj_regression_losslayer is(1, out_height, out_width, 20). You directly feedproj_label,proj_weightand that output to functionsmoothl1_metric. Then you traverse the data throughsize = label.shape[0]. I wonder that you might have flatted the data somewhere, or the value of size should be 1.Could you please explain this to me? @YunzhuLi