histocartography.ml.layers.multi_layer_gnn module

Summary

Classes:

MultiLayerGNN

MultiLayer network that concatenates several gnn layers.

class MultiLayerGNN(layer_type='gin_layer', input_dim=None, output_dim=32, num_layers=3, readout_op='concat', readout_type='mean', **kwargs)[source]

Bases: torch.nn.modules.module.Module

MultiLayer network that concatenates several gnn layers.

__init__(layer_type='gin_layer', input_dim=None, output_dim=32, num_layers=3, readout_op='concat', readout_type='mean', **kwargs)None[source]

MultiLayer GNN constructor.

Parameters
  • layer_type (str) – GNN layer type. Default to “gin_layer”.

  • input_dim (int) – Input dimension of the node features. Default to None.

  • output_dim (int) – Output dimension of the node embeddings. Default to 32.

  • num_layers (int) – Number of GNN layers. Default to 3.

  • readout_op (str) – How the intermediate node embeddings are aggregated. Default to “concat”.

  • readout_type (str) – Global node pooling operation. Default to “mean”.

forward(g, h, with_readout=True)[source]

Forward pass. :param g: (DGLGraph) :param h: (FloatTensor) :param cat: (bool) if concat the features at each conv layer :return:

set_lrp(with_lrp)[source]
lrp(relevance_score)[source]

Reference

If you use histocartography in your projects, please cite the following:

@inproceedings{pati2021,
    title = {Hierarchical Graph Representations for Digital Pathology},
    author = {Pushpak Pati, Guillaume Jaume, Antonio Foncubierta, Florinda Feroce, Anna Maria Anniciello, Giosuè Scognamiglio, Nadia Brancati, Maryse Fiche, Estelle Dubruc, Daniel Riccio, Maurizio Di Bonito, Giuseppe De Pietro, Gerardo Botti, Jean-Philippe Thiran, Maria Frucci, Orcun Goksel, Maria Gabrani},
    booktitle = {https://arxiv.org/pdf/2102.11057},
    year = {2021}
}