GraphSAGEConv
- class dhg.nn.GraphSAGEConv(*args, **kwargs)[source]
Bases:
torch.nn.ModuleThe GraphSAGE convolution layer proposed in Inductive Representation Learning on Large Graphs paper (NeurIPS 2017).
\[\mathbf{x}^{\prime}_i = \mathbf{W}_1 \mathbf{x}_i + \mathbf{W}_2 \cdot \mathrm{mean}_{j \in \mathcal{N(i)}} \mathbf{x}_j\]- Parameters
in_channels (
int) – \(C_{in}\) is the number of input channels.out_channels (
int) – \(C_{out}\) is the number of output channels.aggr (
str) – The neighbor aggregation method. Currently, only mean aggregation is supported. Defaults to “mean”.bias (
bool) – If set toFalse, the layer will not learn the bias parameter. Defaults toTrue.use_bn (
bool) – If set toTrue, the layer will use batch normalization. Defaults toFalse.drop_rate (
float) – The dropout probability. Ifdropout <= 0, the layer will not drop values. Defaults to0.5.is_last (
bool) – If set toTrue, the layer will not apply the final activation and dropout functions. Defaults toFalse.