Commit 94a01039 authored by Yuxin Wu's avatar Yuxin Wu

hide utils.naming.* from automatic import

parent a4ae0f2d
......@@ -16,7 +16,7 @@ from ..utils import logger
_LAYER_LOGGED = set()
_LAYER_REGISTERED = {}
__all__ = ['layer_register', 'VariableHolder']
__all__ = ['layer_register']
class VariableHolder(object):
......
......@@ -80,15 +80,6 @@ def get_global_step_value():
get_global_step_var())
# @memoized
# def get_local_step_var():
# try:
# return tf.get_default_graph().get_tensor_by_name(LOCAL_STEP_VAR_NAME)
# except KeyError:
# logger.warn("get_local_step_var() is only available to use in callbacks!")
# raise
def get_op_tensor_name(name):
"""
Will automatically determine if ``name`` is a tensor name (ends with ':x')
......
......@@ -22,7 +22,6 @@ def _global_import(name):
_TO_IMPORT = set([
'naming',
'utils',
])
......
......@@ -7,16 +7,9 @@ import tensorflow as tf
GLOBAL_STEP_INCR_OP_NAME = 'global_step_incr'
GLOBAL_STEP_INCR_VAR_NAME = 'global_step_incr:0'
LOCAL_STEP_OP_NAME = 'local_step'
LOCAL_STEP_VAR_NAME = 'local_step:0'
# extra variables to summarize during training in a moving-average way
MOVING_SUMMARY_OPS_KEY = 'MOVING_SUMMARY_OPS'
SUMMARY_BACKUP_KEYS = [tf.GraphKeys.SUMMARIES, MOVING_SUMMARY_OPS_KEY]
TOWER_FREEZE_KEYS = SUMMARY_BACKUP_KEYS
# export all upper case variables
all_local_names = locals().keys()
__all__ = [x for x in all_local_names if x.isupper()]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment