Understanding tf.global_variables_initializer

I would like to understand what tf.global_variables_initializerdoes a little more detail. A rare description is given here :

Returns Op that initializes global variables.

But that really doesn't help me. I know op needs to initialize a chart, but what does that mean? Is this the step at which the schedule is being executed?

+6
source share
1 answer

A more complete description is given here .

Only after running tf.global_variables_initializer()in the session of your variables will hold the values that you told them to keep them when you declare them ( tf.Variable(tf.zeros(...)), tf.Variable(tf.random_normal(...)), ...).

From the TF document:

tf.Variable() :

  • op, .
  • op, . tf.assign op.
  • , op .

:

. - op, op .

+8

All Articles