import numpy as np
import tensorflow as tf

"""
Disclaimer: the weight_variable_glorot function from this file comes from 
tkipf/gae original repository on Graph Autoencoders
"""

def weight_variable_glorot(input_dim, output_dim, name = ""):
    """
    Create a weight variable with Glorot&Bengio (AISTATS 2010) initialization
    """
    init_range = np.sqrt(6.0 / (input_dim + output_dim))
    initial = tf.random_uniform([input_dim, output_dim], minval = -init_range,
                                maxval = init_range, dtype = tf.float32)
    return tf.Variable(initial, name = name)