class_docstr: ```
  Abstract class to preprocess data
  ```
class_docstr_tok: ["``","`","Abstract","class","to","preprocess","data","``","`"]
docstr: ```
  Export model to TFLite
  Args:
    fpath(str): String representing full path to model file where TFLite model will be saved.
                Example: '/tmp/my_model.tflite'
    verbose(bool): verbosity
  Returns:
    str: fpath is returned back
  ```
docstr_tok: ["``","`","Export","model","to","TFLite","Args",":","fpath","(","str",")",":","String","representing","full","path","to","model","file","where","TFLite","model","will","be","saved",".","Example",":","'\/tmp\/my_model.tflite'","verbose","(","bool",")",":","verbosity","Returns",":","str",":","fpath","is","returned","back","``","`"]
code: def export_model_to_tflite(self, fpath, verbose=1):
      """
      ```
      Export model to TFLite
      Args:
        fpath(str): String representing full path to model file where TFLite model will be saved.
                    Example: '/tmp/my_model.tflite'
        verbose(bool): verbosity
      Returns:
        str: fpath is returned back
      ```
      """
      if verbose:
          print(
              "converting to TFLite format ... this may take a few moments..."
          )
      if U.is_huggingface(model=self.model):
          tokenizer = self.preproc.get_tokenizer()
          maxlen = self.preproc.maxlen
          input_dict = tokenizer(
              "Name",
              return_tensors="tf",
              padding="max_length",
              max_length=maxlen,
          )
  
          if version.parse(tf.__version__) < version.parse("2.2"):
              raise Exception(
                  "export_model_to_tflite requires tensorflow>=2.2"
              )
              # self.model._set_inputs(input_spec, training=False) # for tf < 2.2
          self.model._saved_model_inputs_spec = None  # for tf > 2.2
          self.model._set_save_spec(input_dict)  # for tf > 2.2
          self.model._get_save_spec()
          if verbose:
              print("----------------------------------------------")
              print(
                  'NOTE: For Hugging Face models, please ensure you use return_tensors="tf" and padding="max_length" when encoding your inputs.'
              )
              print("----------------------------------------------")
  
      converter = tf.lite.TFLiteConverter.from_keras_model(self.model)
  
      # normal conversion
      converter.target_spec.supported_ops = [
          tf.lite.OpsSet.SELECT_TF_OPS
      ]
      tflite_model = converter.convert()
      open(fpath, "wb").write(tflite_model)
      if verbose:
          print("done.")
      return fpath
  
file_path: ktrain/ktrain/predictor.py
imports: from .None import utils
  from .imports import *
label_desc: Use image node_id 8 for calling the Predictor obj's underlying member method code with example usage: obj.export_model_to_tflite(fpath, verbose) and returns: fpath