def print_all_variables(train_only=False):
 tvar = (tf.trainable_variables() if train_only else tf.all_variables())
 for (idx, v) in enumerate(tvar):
  print '  var {:3}: {:15}   {}'.format(idx, str(v.get_shape()), v.name)

def print_all_variables ( train_only = False ) : tvar = ( tf . trainable_variables ( ) if train_only else tf . all_variables ( ) ) for ( idx , v ) in enumerate ( tvar ) : print '  var {:3}: {:15}   {}' . format ( idx , str ( v . get_shape ( ) ) , v . name )
print all trainable and non-trainable variables without tl .