code: def visualize_conv_weights(filters, name):
      """Visualize use weights in convolution filters.
  
      Args:
          filters: tensor containing the weights [H,W,Cin,Cout]
          name: label for tensorboard
  
      Returns:
          image of all weight
      """
      with tf.name_scope("visualize_w_" + name):
          filters = tf.transpose(
              filters, (3, 2, 0, 1)
          )  # [h, w, cin, cout] -> [cout, cin, h, w]
          filters = tf.unstack(filters)  # --> cout * [cin, h, w]
          filters = tf.concat(filters, 1)  # --> [cin, cout * h, w]
          filters = tf.unstack(filters)  # --> cin * [cout * h, w]
          filters = tf.concat(filters, 1)  # --> [cout * h, cin * w]
          filters = tf.expand_dims(filters, 0)
          filters = tf.expand_dims(filters, -1)
  
      tf.summary.image("visualize_w_" + name, filters)
  
file_path: tensorpack/examples/basics/mnist-visualizations.py
imports: from tensorpack import tfv1
  from tensorpack import *
  from tensorpack.dataflow import dataset
label_desc: Use image node_id 1 for calling a global function with example usage: visualize_conv_weights(filters, name) without return types