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: Magic method called during deserialization.
  
  Parameters
  ----------
  state : dict, as returned from __getstate__(), used for correct deserialization
  
  Returns
  -------
  -
docstr_tok: ["Magic","method","called","during","deserialization",".","Parameters","--","--","--","--","--","state",":","dict",",","as","returned","from","__getstate__","(",")",",","used","for","correct","deserialization","Returns","--","--","--","-","-"]
code: def __setstate__(self, state):
      """Magic method called during deserialization.
  
      Parameters
      ----------
      state : dict, as returned from __getstate__(), used for correct deserialization
  
      Returns
      -------
      -
      """
      from tensorflow.keras.optimizers import deserialize
  
      self.__dict__ = state
  
      if hasattr(self, "model_"):
          self.__dict__["model_"] = self.model_
          if hasattr(self, "model_.optimizer"):
              self.__dict__["optimizer_"] = self.model_.optimizer
  
      # if optimizer_ exists, set optimizer as optimizer_
      if self.__dict__.get("optimizer_") is not None:
          self.__dict__["optimizer"] = self.__dict__["optimizer_"]
      # else model may not have been built, but an optimizer might be passed
      else:
          # Having 0 as value implies "optimizer" attribute was None
          # as per __getstate__()
          if self.__dict__.get("optimizer") == 0:
              self.__dict__["optimizer"] = None
          elif self.__dict__.get("optimizer") == -1:
              # `optimizer` doesn't exist as a parameter alone, so delete it.
              del self.__dict__["optimizer"]
          else:
              if isinstance(self.optimizer, dict):
                  self.__dict__["optimizer"] = deserialize(
                      self.optimizer
                  )
              else:
                  # must have been a string already, no need to set
                  pass
  
      if hasattr(self, "history"):
          self.__dict__["history"] = self.history
  
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 8 for calling the BaseDeepClassifier obj's underlying member method code with example usage: obj.__setstate__(state) without return types