pangdan
pangdan

Reputation: 61

Can we not give the name for a tensor in tf.get_variable in tensorflow?

In tf.get_variable(), there is a need to give a name for a variable. In contrast, it is not a must to specify names for variables in tf.Variable() function and tensorflow will give tensors default names. So, is there any trick for allowing us to omit manual name specification.

Upvotes: 0

Views: 106

Answers (1)

Mahmoud GeMy
Mahmoud GeMy

Reputation: 143

I believe that can't be done. As the main aim for tf.get_variable() is to search for a variable with the same name first and if it didn't find it it creates a new one. So if you just want to create a new variable use tf.Variable() instead

Upvotes: 1

Related Questions