- class DeepGCNLayer(conv: Optional[Module] = None, norm: Optional[Module] = None, act: Optional[Module] = None, block: str = 'res+', dropout: float = 0.0, ckpt_grad: bool = False)
The skip connection operations from the “DeepGCNs: Can GCNs Go as Deep as CNNs?” and “All You Need to Train Deeper GCNs” papers. The implemented skip connections includes the pre-activation residual connection (
"res+"), the residual connection (
"res"), the dense connection (
"dense") and no connections (
"res") / Dense (
"dense") / Plain (
For an example of using
GENConv, see examples/ogbn_proteins_deepgcn.py.
block (str, optional) – The skip connection operation to use (
dropout (float, optional) – Whether to apply or dropout. (default:
ckpt_grad (bool, optional) – If set to
True, will checkpoint this part of the model. Checkpointing works by trading compute for memory, since intermediate activations do not need to be kept in memory. Set this to
Truein case you encounter out-of-memory errors while going deep. (default:
Resets all learnable parameters of the module.