kimhc6028 / relational-networks

Pytorch implementation of "A simple neural network module for relational reasoning" (Relational Networks)
https://arxiv.org/pdf/1706.01427.pdf
BSD 3-Clause "New" or "Revised" License
812 stars 160 forks source link

Dealing with pixels misunderstanding ? #10

Closed phongnhhn92 closed 7 years ago

phongnhhn92 commented 7 years ago

Hello sir, I am reading the paper and your code. However there is one thing I dont understand from your implementation. In the paper, at the Section 4 (Dealing with pixels), the author said that: "So after convolving the image, each of the d2 k-dimensional cells in the d x d feature maps was tagged with an arbitrary coordinate ...". So my question is in your code, which part is referring to this and would you please explain more about it since it is kind a difficult for me to understand it. Thanks !

shamitlal commented 7 years ago

Check out the lines 47-53 in model.py. Author has generated the coordinates here. The coordinates are then concatenated with the feature map vectors in lines 77-78.

kimhc6028 commented 7 years ago

Sorry for late reply. In the newest master branch, line 107-117 in model.py prepares coordinates tensor, and line 136 assigns coordinates to feature vector. Thank you, and reopening this issue is always welcome!