materialsvirtuallab / megnet

Graph Networks as a Universal Machine Learning Framework for Molecules and Crystals
BSD 3-Clause "New" or "Revised" License
497 stars 155 forks source link

code in pytorch? #349

Closed kdmsit closed 1 year ago

kdmsit commented 2 years ago

Hello,

Is there any version of this code available in PyTorch? I am not much comfortable with TensorFlow, so if I get a torch version it would have been really helpful.

shyuep commented 2 years ago

Most of the API does not require you to know Tensorflow or Pytorch unless you want to make internal changes. Unfortunately, there are too many ML backends out there and we cannot spend our effort supporting different backends.

That said, @chc273 it is my understanding that MLPs are mainly the part that are implemented in TF? If so, can we just isolate that part and provide the option for people to supply alternative implementations of the MLPs in other frameworks like Pytorch or others?

chc273 commented 2 years ago

@shyuep all the neural network codes are in tensorflow. It will need complete rewrite of all essential part to work with pytorch.

I do see that there are other implementations of megnet in different frameworks. For example, you can find a pytorch version here

https://github.com/vxfung/MatDeepLearn/blob/main/matdeeplearn/models/megnet.py

megnet was also implemented in chainer chemistry.

shyuep commented 1 year ago

This is resolved with the new matgl code base.