Does it exist a parameter that specifies a tf.Variable
as non-trainable, so that the variable is not included in tf.trainable_variables()
?
You can mark variables as "non-trainable" on definition:
v = tf.Variable(tf.zeros([1]), trainable=False)
From the linked documentation (circa TensorFlow v0.11):
trainable: If True, the default, also adds the variable to the graph collection GraphKeys.TRAINABLE_VARIABLES. This collection is used as the default list of variables to use by the Optimizer classes.
There are also ways to change this condition with APIs such as tf.get_variable([v]).