0

I am experimenting with the TensorFlow dropout function. Since a functionality where the dropout rate decreases with time during training was too complicated to implement (tried all day yesterday), I thought using random dropout rates for each iteration could also be a good idea.

I tried the following line:

X = tf.nn.dropout(X, tf.Variable(tf.random_uniform([], 0.4,0.95)))

For using random dropout rates between 0.4 and 0.95 during training. This did not work out, I got the following error:

FailedPreconditionError: Attempting to use uninitialized value generator_1/Variable

How can I fix this?

halfer
  • 19,824
  • 17
  • 99
  • 186
beinando
  • 477
  • 4
  • 18

1 Answers1

0

okay, i fixed it. It must be :

X = tf.nn.dropout(X, tf.random_uniform([], 0.4,0.95))

tf.Variable is not necessary. Can close that.

beinando
  • 477
  • 4
  • 18