torch_geometric.nn.models.NeuralFingerprint

class NeuralFingerprint(in_channels: int, hidden_channels: int, out_channels: int, num_layers: int, **kwargs)[source]

Bases: Module

The Neural Fingerprint model from the “Convolutional Networks on Graphs for Learning Molecular Fingerprints” paper to generate fingerprints of molecules.

Parameters:
  • in_channels (int) – Size of each input sample.

  • hidden_channels (int) – Size of each hidden sample.

  • out_channels (int) – Size of each output fingerprint.

  • num_layers (int) – Number of layers.

  • **kwargs (optional) – Additional arguments of torch_geometric.nn.conv.MFConv.

forward(x: Tensor, edge_index: Union[Tensor, SparseTensor], batch: Optional[Tensor] = None, batch_size: Optional[int] = None) Tensor[source]
reset_parameters()[source]

Resets all learnable parameters of the module.