code: def conv2d(input_, filter_):
      assert input_.ndim == 4, (
          "input_ must have 4 dimensions "
          "corresponding to batch, height, width and channels"
      )
      assert (
          filter_.ndim == 2
      ), "filter_ must have 2 dimensions and will be applied channelwise"
      with tf.Graph().as_default(), tf.Session():
          filter_ = tf.tensordot(
              filter_.astype(input_.dtype),
              np.eye(input_.shape[-1], dtype=input_.dtype),
              axes=[[], []],
          )
          return tf.nn.conv2d(
              input_,
              filter=filter_,
              strides=[1, 1, 1, 1],
              padding="SAME",
          ).eval()
  
file_path: lucid/lucid/scratch/rl_util/util.py
imports: import numpy
  import tensorflow
  import scipy.ndimage
  import lucid.optvis.render
  from lucid.misc.io.collapse_channels import hue_to_rgb
label_desc: Use image node_id 6 for calling a global function with example usage: conv2d(input_, filter_) and returns: tf