class_docstr: ```
  Base class for custom datasets in ktrain.
  
  If subclass of Dataset implements a method to to_tfdataset
  that converts the data to a tf.Dataset, then this will be
  invoked by Learner instances just prior to training so
  fit() will train using a tf.Dataset representation of your data.
  Sequence methods such as __get_item__ and __len__
  must still be implemented.
  
  The signature of to_tfdataset is as follows:
  
  def to_tfdataset(self, training=True)
  
  See ktrain.text.preprocess.TransformerDataset as an example.
  ```
class_docstr_tok: ["``","`","Base","class","for","custom","datasets","in","ktrain",".","If","subclass","of","Dataset","implements","a","method","to","to_tfdataset","that","converts","the","data","to","a","tf.Dataset",",","then","this","will","be","invoked","by","Learner","instances","just","prior","to","training","so","fit","(",")","will","train","using","a","tf.Dataset","representation","of","your","data",".","Sequence","methods","such","as","__get_item__","and","__len__","must","still","be","implemented",".","The","signature","of","to_tfdataset","is","as","follows",":","def","to_tfdataset","(","self",",","training=True",")","See","ktrain.text.preprocess.TransformerDataset","as","an","example",".","``","`"]
code: def __init__(self, batch_size=32):
      self.batch_size = batch_size
  
imports: from .imports import *
label_desc: Use image node_id 1 to create a new SequenceDataset object from inherited base classes: Dataset, keras.utils with example: obj = SequenceDataset(batch_size)