He Uniform¶
-
class
HeUniform
(RandomInitializer)¶ The He Uniform initializer.
Reference: [HE-2015]
Draws samples from a uniform distribution
- Real case:
x ~ U[-limit, limit]
wherelimit = sqrt(6 / fan_in)
- Complex case:
z / Re{z} = Im{z} ~ U[-limit, limit]
wherelimit = sqrt(3 / fan_in)
where
fan_in
is the number of input units in the weight tensor.Standalone usage:
import cvnn initializer = cvnn.initializers.HeUniform() values = initializer(shape=(2, 2)) # Returns a complex He Uniform tensor of shape (2, 2)
Usage in a cvnn layer:
import cvnn initializer = cvnn.initializers.HeUniform() layer = cvnn.layers.Dense(input_size=23, output_size=45, weight_initializer=initializer)
- Real case:
-
__call__
(self, shape, dtype=tf.dtypes.complex64)¶ - Returns a real-valued tensor object initialized as specified by the initializer.
- The complex dtype input will only be used to know the limits to be used. This result must be used for the real and imaginary part separately.
Parameters: - shape – Shape of the tensor.
- dtype – Optinal dtype of the tensor. Either floating or complex. ex:
tf.complex64
ortf.float32