tf.trainable_variables
tf.trainable_variables(scope=None)
Defined intensorflow/python/ops/variables.py
.
See the guide:Variables > Variable helper functions
Returns all variables created withtrainable=True
.
When passedtrainable=True
, theVariable()
constructor automatically adds new variables to the graph collectionGraphKeys.TRAINABLE_VARIABLES
. This function returns the contents of that collection.
Args:
scope
: (Optional.) A string. If supplied, the resulting list is filtered to include only items whosename
attribute matchesscope
usingre.match
. Items without aname
attribute are never returned if a scope is supplied. The choice ofre.match
means that ascope
without special tokens filters by prefix.
Returns:
A list of Variable objects.