xnn.gnn.models.gemnet.ScaleFactor#
- class xnn.gnn.models.gemnet.ScaleFactor[source]#
Bases:
ModuleA constant factor that keeps the activation variance of a layer (paper section 6).
It multiplies the output
yof a sum aggregation or a Hadamard / bilinear product;GemNet.fit_scaling_factors()sets it so that the variance ofymatches that of the layer inputrefon data.- Variables:
- forward(ref, y)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.