class_docstr: Abstract base class for deep learning time series classifiers.
  
  The base classifier provides a deep learning default method for
  _predict and _predict_proba, and provides a new abstract method for building a
  model.
  
  Parameters
  ----------
  batch_size : int, default = 40
      training batch size for the model
  
  Attributes
  ----------
  self.model_ - the fitted DL model
docstr: Serialize & return DL Estimator using `dump` and `dumps` functions.
docstr_tok: ["Serialize","&","return","DL","Estimator","using","`","dump","`","and","`","dumps","`","functions","."]
code: def _serialize_using_dump_func(self, path, dump, dumps):
      """Serialize & return DL Estimator using `dump` and `dumps` functions."""
      import shutil
      from zipfile import ZipFile
  
      history = (
          self.history.history if self.history is not None else None
      )
      if path is None:
          _check_soft_dependencies("h5py", severity="error")
          import h5py
  
          in_memory_model = None
          if self.model_ is not None:
              with h5py.File(
                  "disk_less", "w", driver="core", backing_store=False
              ) as h5file:
                  self.model_.save(h5file)
                  h5file.flush()
                  in_memory_model = h5file.id.get_file_image()
  
          in_memory_history = dumps(history)
          return (
              type(self),
              (
                  dumps(self),
                  in_memory_model,
                  in_memory_history,
              ),
          )
  
      if self.model_ is not None:
          self.model_.save(path / "keras/")
  
      with open(path / "history", "wb") as history_writer:
          dump(history, history_writer)
      with open(path / "_metadata", "wb") as file:
          dump(type(self), file)
      with open(path / "_obj", "wb") as file:
          dump(self, file)
  
      shutil.make_archive(base_name=path, format="zip", root_dir=path)
      shutil.rmtree(path)
      return ZipFile(path.with_name(f"{path.stem}.zip"))
  
imports: from abc import ABC, abstractmethod
  import numpy
  from sklearn.preprocessing import LabelEncoder, OneHotEncoder
  from sklearn.utils import check_random_state
  from sktime.base._base import SERIALIZATION_FORMATS
  from sktime.classification.base import BaseClassifier
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 10 for calling the BaseDeepClassifier obj's underlying member method code with example usage: obj._serialize_using_dump_func(path, dump, dumps) and returns: ZipFile, type,  dumps,  in_memory_model,  in_memory_history