def _glorot_uniform(self, shape, dtype=tf.float32):
    """Glorot uniform initializer."""
    fan_out = functools.reduce(operator.mul, self.filters)
    fan_in = functools.reduce(operator.mul, shape[:self.contract_axes])
    scale = 1. / max(1., (fan_in + fan_out) / 2.)
    limit = math.sqrt(3.0 * scale)
    return tf.random.uniform(shape, -limit, limit, dtype)