class_docstr: Batch sequence generator.
  
  Take a (list of) input tensors and a batch size
  and creates a generators that creates a sequence of batches.
  
  :param Xs: One or a list of tensors. First axis needs to have same length.
  :param batch_size: Batch size. Default 32.
class_docstr_tok: ["Batch","sequence","generator",".","Take","a","(","list","of",")","input","tensors","and","a","batch","size","and","creates","a","generators","that","creates","a","sequence","of","batches",".",":","param","Xs",":","One","or","a","list","of","tensors",".","First","axis","needs","to","have","same","length",".",":","param","batch_size",":","Batch","size",".","Default","32","."]
code: def __init__(
      self, Xs: OptionalList[Tensor], batch_size: int = 32
  ) -> None:
      self.Xs: list[Tensor] = to_list(Xs)
      self.single_tensor: bool = len(Xs) == 1
      self.batch_size: int = batch_size
  
      if not self.single_tensor:
          for X in self.Xs[1:]:
              assert X.shape[0] == self.Xs[0].shape[0]
      super().__init__()
  
file_path: innvestigate/src/innvestigate/utils/sequence.py
imports: from __future__ import annotations
  import math
  from typing import Callable
  import tensorflow.keras.utils
  from innvestigate.backend import to_list
  from innvestigate.backend.types import OptionalList, Tensor
label_desc: Use image node_id 1 to create a new BatchSequence object from inherited base classes: kutils with example: obj = BatchSequence(Xs, batch_size)