def log_variables(variables=None):
"""Logs variable information.
This function logs the name, shape, type, collections, and device for either
all variables or a given iterable of variables.
Args:
variables: iterable of variables; if not provided, then all variables
(in the default graph) are logged.
"""
if variables is None:
variables = tf.global_variables() + tf.local_variables()
for row in format_variables(variables, join_lines=False):
tf.logging.info(row)
评论列表
文章目录