def add_variable(var, restore=True):
 collections = [MODEL_VARIABLES]
 if restore:
  collections.append(VARIABLES_TO_RESTORE)
 for collection in collections:
  if (var not in tf.get_collection(collection)):
   tf.add_to_collection(collection, var)

def add_variable ( var , restore = True ) : collections = [ MODEL_VARIABLES ] if restore : collections . append ( VARIABLES_TO_RESTORE ) for collection in collections : if ( var not in tf . get_collection ( collection ) ) : tf . add_to_collection ( collection , var )
adds a variable to the model_variables collection .