google-deepmind / graph_nets

Build Graph Nets in Tensorflow
https://arxiv.org/abs/1806.01261
Apache License 2.0
5.34k stars 783 forks source link

Is there relationship between model and form of base graph? #128

Open cheezzjazz opened 3 years ago

cheezzjazz commented 3 years ago

Hi, I'm interested in your novel work. I tried to change some condition in 'demo/physics.ipynb'. I wonder whether it also predict velocity well when I change initial position of spring. For example, I changed that the only first mass is fixed in function 'base_graph'.(it means the last mass is not fixed.) And I added damping force with hooke's law in Springsimulator. I thought this is so small condition for affecting but, the result of inference didn't follow target and spread out.

Is there relationship between model structure and form of initial condition(such as base graph)? and how can I change it to fit the target?

alvarosg commented 3 years ago

Thank you for your message. In principle this model should work with quite a broad a range of numerical systems. In fact we have used similar models with some minor modifications for much bigger and complex systems. I would recommend to follow that paper I linked, and maybe use that model, and probably train the model for longer than in the demo.

Hope this helps!

cheezzjazz commented 3 years ago

Thank you for your advise. As you said, I tried to change the model you recommended. I only changed a model in demo/physics to the model you mentioned. and I also change some code about loss(for matching data format). I computed loss with velocity (not acceleration). So, I could get the results like this.

Though I set iteration : 10000, num_processing_step : 2, this result looks so wired. there are edges being changing too long. Where can I modify to improve the result? hair_graph_animation_150_2