code: def tf_baseline_conv2d():
      import tensorflow as tf
      import cntk.contrib.crosstalk.crosstalk_tensorflow as crtf
  
      ci = crtf.instance
  
      tf.reset_default_graph()
  
      x = tf.placeholder(
          tf.float32, [batch_size, num_chars, char_emb_dim]
      )
      filter_bank = tf.get_variable(
          "char_filter_bank",
          shape=[filter_width, char_emb_dim, num_filters],
          dtype=tf.float32,
      )
      bias = tf.get_variable(
          "char_filter_biases", shape=[num_filters], dtype=tf.float32
      )
  
      char_conv = tf.expand_dims(
          tf.transpose(
              tf.nn.conv1d(x, filter_bank, stride=1, padding="VALID")
              + bias,
              perm=[0, 2, 1],
          ),
          -1,
      )
  
      ci.watch(
          cstk.Conv2DArgs(
              W=crtf.find_trainable("char_filter_bank"),
              b=crtf.find_trainable("char_filter_biases"),
          ),
          "conv2d",
          var_type=cstk.Conv2DAttr,
          attr=cstk.Conv2DAttr(
              filter_shape=(
                  filter_width,
                  char_emb_dim,
              ),
              num_filters=num_filters,
          ),
      )
      ci.watch(
          char_conv, "conv2d_out", var_type=crtf.VariableType
      )  # note the output is transposed to NCHW
  
      with tf.Session() as sess:
          sess.run(tf.global_variables_initializer())
          data = {x: input_data}
          ci.set_workdir(workdir)
          ci.set_data(sess, data)
          ci.fetch("conv2d_out", save=True)
          ci.fetch("conv2d", save=True)
          ci.assign("conv2d", load=True)
          assert ci.compare("conv2d_out")
          ci.reset()
          sess.close()
  
imports: import numpy
  from cntk.contrib import crosstalk
  import tempfile
label_desc: Use image node_id 2 for calling a global function with example usage: tf_baseline_conv2d() without return types