class_docstr: Show learned filters for specific thetas in TensorBoard.
      
class_docstr_tok: ["Show","learned","filters","for","specific","thetas","in","TensorBoard","."]
code: def _trigger_epoch(self):
      def n(x):
          x -= x.min()
          x /= x.max()
          return x
  
      o = self.pred(self.theta)
  
      gt_filters = np.concatenate(
          [self.filters[i, :, :] for i in range(8)], axis=0
      )
      pred_filters = np.concatenate(
          [o[0][i, :, :, 0] for i in range(8)], axis=0
      )
  
      canvas = np.concatenate([n(gt_filters), n(pred_filters)], axis=1)
      l = canvas.shape[0] // 2
      canvas = np.concatenate([canvas[:l], canvas[l:]], axis=1)
      canvas = cv2.resize(canvas[..., None] * 255, (0, 0), fx=10, fy=10)
  
      self.trainer.monitors.put_image("filter_export", canvas)
  
imports: import argparse
  import multiprocessing
  import numpy
  import cv2
  import tensorflow
  from scipy.signal import convolve2d
  from tensorpack import *
  from tensorpack.dataflow import dataset
  from tensorpack.utils import logger
  from tensorpack.utils.gpu import change_gpu
  from tensorpack.utils.argtools import shape2d, shape4d
  from tensorpack.utils.viz import *
label_desc: Use image node_id 3 for calling the OnlineTensorboardExport obj's underlying member method code with example usage: obj._trigger_epoch() and returns: x