Using the two functions seems to get the same result.
t4 = tf.get_variable('t4', initializer=tf.random_normal((2,), seed=0))
t5 = tf.get_variable('t5', shape=(2,), initializer=tf.random_normal_initializer(seed=0))
And I find inside the random_normal_initializer() also use the random_normal().
I indistinctly realize the difference between them. The random_normal will return a constant tensor, but the random_normal_initializer will return value after init.
I want to know more about how to use of these two functions at the right time.
Does it use random_normal to init a variable will actually init twice(after init the variable)? In other words, if there performance problems between them.
Aucun commentaire:
Enregistrer un commentaire