Closed lhwcv closed 3 years ago
Hi, correct, actually the target_classes is initialized as an all 'background class' tensor, so if self.num_classes == 1, the target_classes would be all 1, which would be confused for the network since the 'lane class' is set as 1.
If self.num_classes == 1, then target_classes should not be initialized by 'torch.full'. E.g., initializing target_classes by torch.ones + 1
Just make sure target_classes is not initialized as an all "lane class" vector.
Thanks a lot!
Hi, In dataset:
lanes[lane_pos, 0] = category #which is 1 in the code
While in loss_label, target_classes is all 1 when self.num_classes==1
!!! loss_ce can be alway 0 there. Thanks for your work, wish a reply