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: Save serialized self to bytes-like object or to (.zip) file.
  
  Behaviour:
  if `path` is None, returns an in-memory serialized self
  if `path` is a file, stores the zip with that name at the location.
  The contents of the zip file are:
  _metadata - contains class of self, i.e., type(self).
  _obj - serialized self. This class uses the default serialization (pickle).
  keras/ - model, optimizer and state stored inside this directory.
  history - serialized history object.
  
  
  Parameters
  ----------
  path : None or file location (str or Path)
      if None, self is saved to an in-memory object
      if file location, self is saved to that file location. For eg:
          path="estimator" then a zip file `estimator.zip` will be made at cwd.
          path="/home/stored/estimator" then a zip file `estimator.zip` will be
          stored in `/home/stored/`.
  
  serialization_format: str, default = "pickle"
      Module to use for serialization.
      The available options are present under
      `sktime.base._base.SERIALIZATION_FORMATS`. Note that non-default formats
      might require installation of other soft dependencies.
  
  Returns
  -------
  if `path` is None - in-memory serialized self
  if `path` is file location - ZipFile with reference to the file
docstr_tok: ["Save","serialized","self","to","bytes-like","object","or","to","(",".zip",")","file",".","Behaviour",":","if","`","path","`","is","None",",","returns","an","in-memory","serialized","self","if","`","path","`","is","a","file",",","stores","the","zip","with","that","name","at","the","location",".","The","contents","of","the","zip","file","are",":","_metadata","-","contains","class","of","self",",","i.e.",",","type","(","self",")",".","_obj","-","serialized","self",".","This","class","uses","the","default","serialization","(","pickle",")",".","keras\/","-","model",",","optimizer","and","state","stored","inside","this","directory",".","history","-","serialized","history","object",".","Parameters","--","--","--","--","--","path",":","None","or","file","location","(","str","or","Path",")","if","None",",","self","is","saved","to","an","in-memory","object","if","file","location",",","self","is","saved","to","that","file","location",".","For","eg",":","path=","''","estimator","''","then","a","zip","file","`","estimator.zip","`","will","be","made","at","cwd",".","path=","''","\/home\/stored\/estimator","''","then","a","zip","file","`","estimator.zip","`","will","be","stored","in","`","\/home\/stored\/","`",".","serialization_format",":","str",",","default","=","``","pickle","''","Module","to","use","for","serialization",".","The","available","options","are","present","under","`","sktime.base._base.SERIALIZATION_FORMATS","`",".","Note","that","non-default","formats","might","require","installation","of","other","soft","dependencies",".","Returns","--","--","--","-","if","`","path","`","is","None","-","in-memory","serialized","self","if","`","path","`","is","file","location","-","ZipFile","with","reference","to","the","file"]
code: def save(self, path=None, serialization_format="pickle"):
      """Save serialized self to bytes-like object or to (.zip) file.
  
      Behaviour:
      if `path` is None, returns an in-memory serialized self
      if `path` is a file, stores the zip with that name at the location.
      The contents of the zip file are:
      _metadata - contains class of self, i.e., type(self).
      _obj - serialized self. This class uses the default serialization (pickle).
      keras/ - model, optimizer and state stored inside this directory.
      history - serialized history object.
  
  
      Parameters
      ----------
      path : None or file location (str or Path)
          if None, self is saved to an in-memory object
          if file location, self is saved to that file location. For eg:
              path="estimator" then a zip file `estimator.zip` will be made at cwd.
              path="/home/stored/estimator" then a zip file `estimator.zip` will be
              stored in `/home/stored/`.
  
      serialization_format: str, default = "pickle"
          Module to use for serialization.
          The available options are present under
          `sktime.base._base.SERIALIZATION_FORMATS`. Note that non-default formats
          might require installation of other soft dependencies.
  
      Returns
      -------
      if `path` is None - in-memory serialized self
      if `path` is file location - ZipFile with reference to the file
      """
      import pickle
      from pathlib import Path
  
      if serialization_format not in SERIALIZATION_FORMATS:
          raise ValueError(
              f"The provided `serialization_format`='{serialization_format}' "
              "is not yet supported. The possible formats are: "
              f"{SERIALIZATION_FORMATS}."
          )
  
      if path is not None and not isinstance(path, (str, Path)):
          raise TypeError(
              "`path` is expected to either be a string or a Path object "
              f"but found of type:{type(path)}."
          )
  
      if path is not None:
          path = Path(path) if isinstance(path, str) else path
          path.mkdir()
  
      if serialization_format == "cloudpickle":
          _check_soft_dependencies("cloudpickle", severity="error")
          import cloudpickle
  
          return self._serialize_using_dump_func(
              path=path,
              dump=cloudpickle.dump,
              dumps=cloudpickle.dumps,
          )
  
      elif serialization_format == "pickle":
          return self._serialize_using_dump_func(
              path=path,
              dump=pickle.dump,
              dumps=pickle.dumps,
          )
  
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 9 for calling the BaseDeepClassifier obj's underlying member method code with example usage: obj.save(path, serialization_format) and returns: self, self