Skip to content

How to get the centrality encoding module and spatial encoding module from gene graph #2

Description

@LeeWang21

Hi, developer!
Thanks for developing the tools. The CMM pre-training task is impressive, especially the GeneGraph attention layers. But I am confused about the calculation of centrality encoding module and spatial encoding module.

For centrality encoding module:
In the source code, I see the in_degree_embed and out_degree_embed , which are just the nn.Embeddings.

self.embed_in_degree = nn.Sequential(
            nn.Embedding(20000, self.d_model, padding_idx=0)
        )
self.embed_out_degree = nn.Sequential(
            nn.Embedding(20000, self.d_model, padding_idx=0)
        )

is this the centrality encoding module? It seems that the embed_in_degree and embed_out_degree are not related to gene graph.

For spatial encoding module, I do not known the source code.

could you plz tell me how to get the centrality encoding module and spatial encoding module from gene graph ?

Best wishes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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