kgcnn.initializers package¶
Submodules¶
kgcnn.initializers.initializers module¶
-
class
kgcnn.initializers.initializers.
GlorotOrthogonal
(gain=1.0, seed=None, scale=1.0, mode='fan_avg')[source]¶ Bases:
keras.src.initializers.random_initializers.OrthogonalInitializer
Combining Glorot variance and Orthogonal initializer.
Generate a weight matrix with variance according to Glorot initialization. Based on a random (semi-) orthogonal matrix neural networks are expected to learn better when features are de-correlated.
This is stated by e.g.:
“Reducing over-fitting in deep networks by de-correlating representations” by M. Cogswell et al. (2016) https://arxiv.org/abs/1511.06068 .
“Dropout: a simple way to prevent neural networks from over-fitting” by N. Srivastava et al. (2014) https://dl.acm.org/doi/10.5555/2627435.2670313 .
“Exact solutions to the nonlinear dynamics of learning in deep linear neural networks” by A. M. Saxe et al. (2013) https://arxiv.org/abs/1312.6120 .
This implementation has been borrowed and slightly modified from DimeNetPP .
-
class
kgcnn.initializers.initializers.
HeOrthogonal
(gain=1.0, seed=None, scale=1.0, mode='fan_in')[source]¶ Bases:
keras.src.initializers.random_initializers.OrthogonalInitializer
Combining He variance and Orthogonal initializer.
Generate a weight matrix with variance according to He initialization. Based on a random (semi-)orthogonal matrix neural networks are expected to learn better when features are de-correlated.
This is stated by e.g.:
“Reducing over-fitting in deep networks by de-correlating representations” by M. Cogswell et al. (2016) https://arxiv.org/abs/1511.06068 .
- “Dropout: a simple way to prevent neural networks from over-fitting” by N. Srivastava et al. (2014)
“Exact solutions to the nonlinear dynamics of learning in deep linear neural networks” by A. M. Saxe et al. (2013) https://arxiv.org/abs/1312.6120 .
This implementation has been borrowed and slightly modified from GemNet .
-
kgcnn.initializers.initializers.
_compute_fans
(shape)[source]¶ Computes the number of input and output units for a weight shape.
Taken from original TensorFlow implementation and copied here for static reference.
- Parameters
shape – Integer shape tuple or tensor shape.
- Returns
A tuple of integer scalars (fan_in, fan_out).