Siavash
Siavash

Reputation: 485

How can I list all variables in Tensorflow 2.0

How can I list all variables in Tensorflow2.0?

Well in Tensorflow1.x, you can just get tf.global_variables() or other similar commands. How can I do the same thing in Tensorflow 2.0?

Upvotes: 4

Views: 2374

Answers (1)

DecentGradient
DecentGradient

Reputation: 731

You can't, graph variables are all python objects and you need to keep track of them yourself. see Effective TF2 -> No More Globals

Upvotes: 2

Related Questions