Giter VIP home page Giter VIP logo

Comments (3)

jsuarezv avatar jsuarezv commented on August 16, 2024

Dear Ognjen,
Thank you for your interest. What you mention is possible with IGNNITION. You just need to define two different entities (i.e., element types), and then define only outputs for one of them. If you want to add input features only for one element type, you can initialize the hidden states of the other entity without any feature (i.e., "input: [ ]"), so the corresponding hidden state vectors are automatically zero-padded at the beginning.

I think the following example can be useful for you:
https://github.com/BNN-UPC/ignnition/blob/main/examples/Routenet/model_description.yaml

RouteNet operates over a bipartite graph, where graph elements can be paths or links, and it finally outputs only values on paths, so the loss is only computed on these final path-level predictions.

Regards,
José

from ignnition.

MiquelFerriol avatar MiquelFerriol commented on August 16, 2024

Hi @ognjenkundacina,
Yes! It is possible.

Let's say you have two types of identities: once for "inputting" the data called input, and another one called "output" to generate the predictions. Let's also suppose that the "input" has as parameter a variable called "x" and the value to be predicted is called "y". Then, the entity description found in the model_description.yaml should look something like this:

- name: input
  state_dimension: 32
  initial_state:
    - type: build_state
      input: [$x]

- name: output
  state_dimension: 32

The specification over which nodes the GNN needs to make the predictions is defined in the readout phase. In this particular case (let's suppose the readout function is a neural network), you could specify it as:

readout:
- type: neural_network
  input: [output]
  nn_name: readout_model
  output_label: [$y]

Note that the way of indicating over which nodes the prediction is done and the loss is computed is by defining the output_label. In this particular case, the model will only predict the "y" value of the "output" entity.

Here you can find a similar example of what you are trying to do. In it, the graph considers two types of nodes: links and paths. However, the predictions are only done over the paths.

Hope it helps!
Regards,
Miquel

from ignnition.

ognjenkundacina avatar ognjenkundacina commented on August 16, 2024

Dear José and Miquel,

Thank you for your detailed answers!

Regards,
Ognjen

from ignnition.

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.