koyeongmin / PINet

MIT License
205 stars 56 forks source link

Is there a wrong in the agent.py? #40

Open cvchanghao opened 4 years ago

cvchanghao commented 4 years ago

Thanks for your working! Maybe I found a mistake in your code. Can you check this? distance_map = (feature_map-point_feature)**2 distance_map = torch.norm( distance_map, dim=1 ).view(real_batch_size, 1, self.p.grid_y*self.p.grid_x, self.p.grid_y*self.p.grid_x)

on line 203-204 in agent.py. torch.norm() already compute the L2 norm of distance_map, there is no need to square the (feature_map-point_feature).

koyeongmin commented 4 years ago

Thank you! This is my mistake. In new version, the problem is fixed.