vendredi 25 août 2017

Random values in tensorflow

I want to generate random numbers within an activation function such that every time the activation function is called a random number is generated. I tried with random.uniform and with tf.random_uniform but it only generates a single random value when it's compiled and it doesn't change anymore. How can I make it update every time?

Funny fact: When I create a variable using tf.Variable(random.uniform(1,2)) every time the function it's called the value is slightly larger, for instance:

1.22069513798
1.22072458267
1.22075247765
1.22077202797

Thanks




Aucun commentaire:

Enregistrer un commentaire