Git Product home page Git Product logo

Comments (5)

chc273 avatar chc273 commented on June 18, 2024

Hi Nicole @nicolemitchell

Thanks for your interest in our work.

The megnet codebase was written originally using tensorflow 1.x, and was recently upgraded to be compatible with tensorflow 2.0.0 in its main functionalitites. We have not updated all APIs to tensorflow 2.0 yet (e.g., tf.keras and eager mode), since I have noticed issues with tensorflow 2.x in my other works using tensorflow 2.0 during the past months. Notable issues include performance degradation in running in eager mode and also occasional out-of-memory problems.

However, current megnet should not have such problems. We are also using megnet with tensorflow 2.0.0 with no problems. The seg fault problems you described above seem to be related to memory?

For the seg id problems, I am not sure where the problem is. It seems that you are not using molecular data? I have not tested data format other than molecules and crystals, maybe there are some caveats in working with other data. I'd be interested in sorting this out if more details are provided. Do you have a minimal reproducible codebase?

Thanks

Chi

from megnet.

chc273 avatar chc273 commented on June 18, 2024

If you are using only part of megnet together with tensorflow2.x APIs and eager mode instead of using keras, it could also result in the problems above.

from megnet.

nicolemitchell avatar nicolemitchell commented on June 18, 2024

Hi Chi @chc273

Thanks for your prompt reply!

If you are using only part of megnet together with tensorflow2.x APIs and eager mode instead of using keras, it could also result in the problems above.

I am not using any Tensorflow 2.0 APIs or eager mode. However, I've noticed that the stack trace has calls to Tensorflow's eager mode. Is this expected? Or could it be from how Tensorflow and Keras are configured on my machine?

It seems that you are not using molecular data? I have not tested data format other than molecules and crystals, maybe there are some caveats in working with other data. I'd be interested in sorting this out if more details are provided. Do you have a minimal reproducible codebase?

I am using MEGNet on molecules. As input, I provide the Pybel molecular structures. The target I provide is a vector for each molecule of length num_atoms with binary labels. My model simply modifies the existing MEGNet model to feed only the node embeddings to the final dense layers and return a per-atom classification. Instead of the Set2Set and Concatenation layers following the MEGNet blocks, I create final_vec as follows:

final_vec = Lambda(lambda x: x[0] + 0*x[1][:,0,:])([x1_, x3_])

from megnet.

chc273 avatar chc273 commented on June 18, 2024

@nicolemitchell Thanks. This is definitely an interesting topic to explore, but without a minimal example, I cannot really guess what's going on.

Since it involves modifications of the codes and building new models, it seems to be more of a research project instead of an issue of megnet. Currently, we are also exploring possibilities to use megnet in molecular applications.

If you have a working example or a repo, I may be interested to see if I can build off it and include new models to the package.

from megnet.

chc273 avatar chc273 commented on June 18, 2024

@nicolemitchell I have updated megnet packages to use tf.keras instead of keras. All tests are passed with tensorflow version 2.1.0

from megnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.