histocartography.ml.layers.mlp module¶
Summary¶
Classes:
- class MLP(in_dim, hidden_dim, out_dim, num_layers=1, act='relu', use_bn=False, bias=True, verbose=False, dropout=0.0, with_lrp=False)[source]¶
Bases:
torch.nn.modules.module.Module
- __init__(in_dim, hidden_dim, out_dim, num_layers=1, act='relu', use_bn=False, bias=True, verbose=False, dropout=0.0, with_lrp=False)[source]¶
MLP Constructor :param in_dim: (int) input dimension :param hidden_dim: (int) hidden dimension(s), if type(h_dim) is int => all the hidden have the same dimensions
if type(h_dim) is list => hidden use val in list as dimension
- Parameters
out_dim – (int) output_dimension
num_layers – (int) number of layers
act – (str) activation function to use, last layer without activation!
use_bn – (bool) il layers should have batch norm
bias – is Linear should have bias term, if type(h_dim) is bool => all the hidden have bias terms if type(h_dim) is list of bool => hidden use val in list as bias
verbose – (bool) verbosity level
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}
}