xnn.trfnn.models.blocks.GraphDropPath#

class xnn.trfnn.models.blocks.GraphDropPath(drop_prob)[source]#

Bases: Module

Stochastic depth per structure: drop a residual branch for whole structures.

Parameters:

drop_prob (float) – Probability of dropping the branch of a structure during training.

forward(x, batch, num_graphs)[source]#

Scale x (atoms on dim 0) by a kept-and-rescaled mask of its structure.

Parameters:
Return type:

Tensor