class Force2VecModel(*args: Any, **kwargs: Any)

Bases: BaseNet

The Force2VecModel for learning latent embeddings in unsupervised manner for Geom-GCN layer

Parameters:
  • device – (device): Either ‘cuda’ or ‘cpu’

  • hidden_layer – (int): The size of hidden layer (default:64)

  • out_layer – (int): The size of output layer (default:128)

  • dropout – (float): Dropout (default:0.0)

  • num_layers – (int): Number of layers in the model (default:2)

  • heads – (int): Number of heads in GAT conv (default:1)

loss(out: torch.Tensor, pos_neg_samples: torch.Tensor) torch.Tensor

Calculate loss

Parameters:
  • out – Tensor

  • pos_neg_samples – Tensor

Returns:

(Tensor) Loss