GithubHelp home page GithubHelp logo

Comments (6)

zhengsx avatar zhengsx commented on August 30, 2024

Hi, 9 is the number of node features (since there are 9 atom features for sample in pcqm4m dataset), and 512 is the maximum categories for each kind of feature. It's equivalent to seperately define 9 nn.Embedding(512, hidden_dim) for each feature. Hope this could address your question about the atom_encoder.

For another question about regression task, do you mean your label is a real value and the objective of model is to regress it? If so, you don't need to modify anything about the task. But if you mean that your feature is in continous space but not category feature, you could simply replace the nn.Embedding() from atom_encoder to a nn.Linear() or MLP.

from graphormer.

Sangyoon-Bae avatar Sangyoon-Bae commented on August 30, 2024

yes graph label is real value and objective of model is to regress it! then my node feature and edge feature are in continuous space. I'll try nn.Linear() ! I have another question, can I st edge feature and node feature as float type?

from graphormer.

zhengsx avatar zhengsx commented on August 30, 2024

I think you can have a try, by the way, discretize the numerical features then using nn.Embedding() is also commonly used.

from graphormer.

Sangyoon-Bae avatar Sangyoon-Bae commented on August 30, 2024

Thanks for kind reply! Sorry for asking lots of question, I'd like to ask that should I change atom_encoder (line 63) , edge_encoder (line 64), out_proj (line 84), and downstream_out_proj (line 86) for regression task like pcqm4m-lsc?

from graphormer.

zhengsx avatar zhengsx commented on August 30, 2024

If you want to use well-trained Graphormer (pre-trained on PCQM4M), you need to modify and use downstream_out_proj, otherwise you can use out_proj without modification. Whether atom_encoder and edge_encoder are needed to be modifed depends on your features as described in previous reply.

from graphormer.

Sangyoon-Bae avatar Sangyoon-Bae commented on August 30, 2024

Thanks a lot!! Your comment really helped me to train my model!!

from graphormer.

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.