nip.utils.torch.CatGraphPairDim

nip.utils.torch.CatGraphPairDim#

class nip.utils.torch.CatGraphPairDim(cat_dim: int, pair_dim: int = 0)[source]#

Concatenate the two node sets for each graph pair.

Parameters:
  • cat_dim (int) – The dimension to concatenate over (i.e. the node dimension).

  • pair_dim (int, default=0) – The graph pair dimension.

Methods Summary

__init__(cat_dim[, pair_dim])

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(x)

Concatenate the two node sets for each graph pair.

Attributes

T_destination

call_super_init

dump_patches

training

Methods

__init__(cat_dim: int, pair_dim: int = 0)[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(x: Tensor) Tensor[source]#

Concatenate the two node sets for each graph pair.

Parameters:

x (Tensor) – The input tensor.

Returns:

x_cat (Tensor) – The input tensor with the two node sets concatenated.