torchcell.models.dango.MetaEmbedding
- class MetaEmbedding(hidden_channels: int)[source]
Bases:
ModuleMeta-embedding module to integrate embeddings from multiple networks.
As described in the paper, this module: 1. Takes embeddings from 6 different PPI networks for each node 2. Uses an MLP to compute attention weights for each embedding 3. Combines embeddings using a weighted sum based on learned attention
- forward(embeddings_dict: dict[str, Tensor]) Tensor[source]
Forward pass to integrate embeddings from multiple networks
- Parameters:
embeddings_dict – Dictionary mapping edge types to node embeddings Each value has shape [num_nodes, hidden_channels]
- Returns:
Integrated embeddings with shape [num_nodes, hidden_channels]