class_docstr: Creates TFLite Model and facilitates reference data generation
class_docstr_tok: ["Creates","TFLite","Model","and","facilitates","reference","data","generation"]
docstr: Returns tf.function that creates TFLite Conv2d layer
docstr_tok: ["Returns","tf.function","that","creates","TFLite","Conv2d","layer"]
code: def create_conv2d_single(
      self, kernel_shape, strides, padding, dilation, activation
  ):
      """Returns tf.function that creates TFLite Conv2d layer"""
  
      @tf.function
      def conv2d_single_function(ifm_tensor):
          """Returns TFLite Conv2d layer"""
          op = tf.nn.conv2d(
              ifm_tensor,
              filters=tf.constant(
                  np.random.uniform(
                      size=[kernel_shape[0], kernel_shape[1], 3, 3]
                  ),
                  dtype=tf.float32,
              ),
              strides=[1, strides[0], strides[1], 1],
              padding=padding,
              dilations=dilation,
          )
          if activation == "RELU":
              op = tf.nn.relu(op)
          elif activation == "NONE":
              pass
          else:
              assert False, f"Unsupported activation {activation}"
          return op
  
      return conv2d_single_function
  
file_path: tvm/python/tvm/relay/testing/tflite.py
imports: from distutils.version import LooseVersion
  import numpy
  import pytest
  import tflite.Model
  import tensorflow
  import tvm
label_desc: Use image node_id 2 for calling the TFLiteModel obj's underlying member method code with example usage: obj.create_conv2d_single(kernel_shape, strides, padding, dilation, activation) and returns: conv2d_single_function, op