def _activation_summary(x):
 tensor_name = re.sub(('%s_[0-9]*/' % TOWER_NAME), '', x.op.name)
 tf.histogram_summary((tensor_name + '/activations'), x)
 tf.scalar_summary((tensor_name + '/sparsity'), tf.nn.zero_fraction(x))

def _activation_summary ( x ) : tensor_name = re . sub ( ( '%s_[0-9]*/' % TOWER_NAME ) , '' , x . op . name ) tf . histogram_summary ( ( tensor_name + '/activations' ) , x ) tf . scalar_summary ( ( tensor_name + '/sparsity' ) , tf . nn . zero_fraction ( x ) )
helper to create summaries for activations .