Tensorflow get all variables in scope

I think you want tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, scope=”my_scope”). This will get all variables in a scope.

To pass to an optimizer you do not want all variables you would just want the trainable variables. Those are also kept in a default collection, which is tf.GraphKeys.TRAINABLE_VARIABLES.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)