RandomFeature
gtrick.random_feature
¶
random_feature(x)
¶
Random feature comes from Random Features Strengthen Graph Neural Networks. This trick adds a random feature to node features.
Example
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
torch.Tensor
|
The node feature. |
required |
Returns:
Type | Description |
---|---|
torch.Tensor
|
The node feature with a random feature. |