Skip to content

How to obtain the categorical node features for GIN and GNNOGB? #220

@Wang-Lin-boop

Description

@Wang-Lin-boop

When calling the GIN or GNNOGB modules, the forward function requires a LongTensor storing the node categorical features, which looks like it may be an attributes of DGLGraph, but I can't find a way to get it in the DGL documentation.

If I can get a dictionary from BaseAtomFeaturizer to store node categorical ID and its features, a function that seems easy to implement manually as well, does BaseAtomFeaturizer support getting a dictionary of a node's categorical features?

Progressively refining this dictionary by analyzing the nodes of each batch seems like a viable option, but it doesn't seem elegant enough that I can't believe it's the right one. Can anyone tell me how you solved this problem? I'am looking forward to you reply.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions