bapred.model package

Submodules

bapred.model.GatedGCNLSPE module

class bapred.model.GatedGCNLSPE.GatedGCNLSPELayer(input_dim, output_dim, dropout, batch_norm, use_lapeig_loss=False, residual=False)[source]

Bases: Module

Param: []

compute_normalized_eta(edges)[source]
forward(g, h, p, e)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

message_func_for_pj(edges)[source]
message_func_for_vij(edges)[source]

bapred.model.GraphGPS module

class bapred.model.GraphGPS.GraphGPS(emb_dim, num_heads)[source]

Bases: Module

forward(g, h, p, e)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

bapred.model.MHA module

class bapred.model.MHA.MultiHeadAttention(embed_dim, num_heads)[source]

Bases: Module

forward(h)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

bapred.model.model module

class bapred.model.model.PredictionPKD(in_size, emb_size, intra_edge_size, inter_edge_size, pose_size, num_layers, dropout_ratio=0.15)[source]

Bases: Module

forward(gp, gl, gc)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Module contents