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

Variables and their requires_grad flags #12

Closed bazingasherlock closed 7 years ago

bazingasherlock commented 7 years ago

Why all of your variables here and here's requires_grad argumand set to False ? You set requires_grad parameter of coord_tensor variable to false and then you concatenate it with the output of cnn (defined as x),whose requires_grad arguman is true by default I guess, at line 78. In this case what is the requires_grad parameter of concatenated variable (output of line 78 which is also x_flat)?

kimhc6028 commented 7 years ago

Sorry, currently I cannot answer this question now because I am under military training. I promise to answer it 3 weeks later. Please wait until then

kimhc6028 commented 7 years ago

I couldn't find any requires_grad parameters set to be true or false. As far as I know, setting required_grad to be false is only required when you want to fix certain layer. RN is end-to-end learning system, so I suspect I didn't need to set any reuiqres_grad to be false. If I am wrong, please tell me.