Graph Augmentations
- hivegraph.augmentations.drop_feature(x: Tensor, drop_prob: float, dtype: dtype = torch.float32) Tensor[source]
Implementation of Masking Node Features (MF)
Randomly masks a fraction of dimensions with zeros in node features.
Ref: Section 3.2.2 of https://arxiv.org/abs/2006.04131v2
- Parameters:
x (torch.Tensor) – Node features.
drop_prob (float) – Probability of dropping a feature.
dtype (torch.dtype) – Data type of the tensor.
- Returns:
Masked node features.
- Return type: