class_docstr: ```
  Main class used to tune and train Keras models for text classification using Array data.
  ```
class_docstr_tok: ["``","`","Main","class","used","to","tune","and","train","Keras","models","for","text","classification","using","Array","data",".","``","`"]
docstr: ```
  prepare data as tf.Dataset
  ```
docstr_tok: ["``","`","prepare","data","as","tf.Dataset","``","`"]
code: def _prepare(self, data, train=True):
      """
      ```
      prepare data as tf.Dataset
      ```
      """
      # HF_EXCEPTION
      # convert arrays to TF dataset (iterator) on-the-fly
      # to work around issues with transformers and tf.Datasets
      if data is None:
          return None
      return data.to_tfdataset(train=train)
  
file_path: ktrain/ktrain/text/learner.py
imports: from ..None import utils
  from ..core import ArrayLearner, GenLearner, _load_model
  from ..imports import *
  from .preprocessor import TransformersPreprocessor
label_desc: Use image node_id 3 for calling the TransformerTextClassLearner obj's underlying member method code with example usage: obj._prepare(data, train) and returns: data, None