lucastabelini / PolyLaneNet

Code for the paper entitled "PolyLaneNet: Lane Estimation via Deep Polynomial Regression" (ICPR 2020)
https://arxiv.org/abs/2004.10924
MIT License
301 stars 75 forks source link

A problem about the "curriculum_steps" in lib/models.py line 65 #51

Closed minghongli233 closed 3 years ago

minghongli233 commented 3 years ago

# def forward(self, x, epoch=None, kwargs): output, extra_outputs = self.model(x, kwargs) for i in range(len(self.curriculum_steps)): if epoch is not None and epoch < self.curriculum_steps[i]: output[-len(self.curriculum_steps) + i] = 0 return output, extra_outputs # I am confused about the implement of the code when conducting the 2order experiment. If the "self.curriculum_steps" is setted as [9000,0,0,0] and the batch size is 16. My understanding about the code is as follow, the shape of "output" is torch.Size([16, 35]), and the line 12 in "output" will be setted as 0 (i.e. [-4,35] = 0). If do this, some samples will be setted as 0 in the batch. To this end, it will not achieve the goal of setting high-order polynomial coefficients to 0. Maybe it should be applied to dimension 1 instead of 0? Could you tell me why use this way to achieve the function? Thank you!

lucastabelini commented 3 years ago

It is indeed a bug. I fixed it in the latest commit.