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
811 stars 162 forks source link

Add CNN-MLP Model #13

Closed mdda closed 7 years ago

mdda commented 7 years ago

To have a clean A/B kind of model, this PR factors out the CNN input stage and the final FC stage. This highlights the differences between the two models clearly.

The specific CNN-MLP implementation has been taken from yangky11's fork. However, since my branch was taken after the '10x speedup' patch, it includes that too.

RN @ epoch 20 :  
   Test set: Relation accuracy: 87% | Non-relation accuracy: 99%
CNN-MLP  @ epoch 100 :  
   Test set: Relation accuracy: 66% | Non-relation accuracy: 69%

It's also now Python3-ready, and there are some other minor tweaks.

What do you think?

kimhc6028 commented 7 years ago

I am very sorry for late reply. I have been on military training until now. I cannot check your pr now. But it seems your code works beautifully. Thank you for your code! Next reply should be in 3 weeks later :)

mdda commented 7 years ago

Great - and thanks for coming up with the original code so quickly. I used it as the basis of my presentation at the first PyTorch event in Singapore, which wasn't videoed but my slides are here.

Stay safe!