In Tensorflow, what is the difference in global_variables_initializer()
and initialize_all_variables()
? I had used both methods to initialize the variables.
Asked
Active
Viewed 205 times
1

nbro
- 15,395
- 32
- 113
- 196

akshaymalviya
- 19
- 3
-
Possible duplicate of [What are the differences between tf.initialize\_all\_variables() and tf.global\_variables\_initializer()](https://stackoverflow.com/questions/41439254/what-are-the-differences-between-tf-initialize-all-variables-and-tf-global-var) – nbro Oct 31 '19 at 21:13
2 Answers
0
I haven't check it out but according to this answer and my personal experience from code in previous versions of tensorflow initialize_all_variables()
used to initialize both global and local variables when was not deprecated but in recent version (where it's considered deprecated) it's just a (deprecated) equivalent to global_variables_initializer()
.
So, depending on the version it might change the answer.

Eypros
- 5,370
- 6
- 42
- 75