ott.neural.networks.potentials.BasePotential.is_initializing#
- BasePotential.is_initializing()#
Returns True if running under self.init(…) or nn.init(…)().
This is a helper method to handle the common case of simple initialization where we wish to have setup logic occur when only called under
module.init
ornn.init
. For more complicated multi-phase initialization scenarios it is better to test for the mutability of particular variable collections or for the presence of particular variables that potentially need to be initialized.- Return type: