class_docstr: Base class for Autoencoder based models.
  
  Args:
      model_config (BaseAEConfig): An instance of BaseAEConfig in which any model's parameters is
          made available.
  
      encoder (BaseEncoder): An instance of BaseEncoder (inheriting from `torch.nn.Module` which
          plays the role of encoder. This argument allows you to use your own neural networks
          architectures if desired. If None is provided, a simple Multi Layer Preception
          (https://en.wikipedia.org/wiki/Multilayer_perceptron) is used. Default: None.
  
      decoder (BaseDecoder): An instance of BaseDecoder (inheriting from `torch.nn.Module` which
          plays the role of decoder. This argument allows you to use your own neural networks
          architectures if desired. If None is provided, a simple Multi Layer Preception
          (https://en.wikipedia.org/wiki/Multilayer_perceptron) is used. Default: None.
  
  .. note::
      For high dimensional data we advice you to provide you own network architectures. With the
      provided MLP you may end up with a ``MemoryError``.
class_docstr_tok: ["Base","class","for","Autoencoder","based","models",".","Args",":","model_config","(","BaseAEConfig",")",":","An","instance","of","BaseAEConfig","in","which","any","model","'s","parameters","is","made","available",".","encoder","(","BaseEncoder",")",":","An","instance","of","BaseEncoder","(","inheriting","from","`","torch.nn.Module","`","which","plays","the","role","of","encoder",".","This","argument","allows","you","to","use","your","own","neural","networks","architectures","if","desired",".","If","None","is","provided",",","a","simple","Multi","Layer","Preception","(","https",":","\/\/en.wikipedia.org\/wiki\/Multilayer_perceptron",")","is","used",".","Default",":","None",".","decoder","(","BaseDecoder",")",":","An","instance","of","BaseDecoder","(","inheriting","from","`","torch.nn.Module","`","which","plays","the","role","of","decoder",".","This","argument","allows","you","to","use","your","own","neural","networks","architectures","if","desired",".","If","None","is","provided",",","a","simple","Multi","Layer","Preception","(","https",":","\/\/en.wikipedia.org\/wiki\/Multilayer_perceptron",")","is","used",".","Default",":","None",".","..","note",":",":","For","high","dimensional","data","we","advice","you","to","provide","you","own","network","architectures",".","With","the","provided","MLP","you","may","end","up","with","a","``","MemoryError","``","."]
code: def _load_custom_decoder_from_folder(cls, dir_path):
      file_list = os.listdir(dir_path)
      cls._check_python_version_from_folder(dir_path=dir_path)
  
      if "decoder.pkl" not in file_list:
          raise FileNotFoundError(
              f"Missing decoder pkl file ('decoder.pkl') in"
              f"{dir_path}... This file is needed to rebuild custom decoders."
              " Cannot perform model building."
          )
  
      else:
          with open(os.path.join(dir_path, "decoder.pkl"), "rb") as fp:
              decoder = CPU_Unpickler(fp).load()
  
      return decoder
  
imports: import inspect
  import logging
  import os
  import shutil
  import sys
  import tempfile
  import warnings
  from copy import deepcopy
  from http.cookiejar import LoadError
  from typing import Optional
  import cloudpickle
  import torch
  import torch.nn
  from ...customexception import BadInheritanceError
  from ...data.datasets import BaseDataset, DatasetOutput
  from ..auto_model import AutoConfig
  from ..nn import BaseDecoder, BaseEncoder
  from ..nn.default_architectures import Decoder_AE_MLP
  from .base_config import BaseAEConfig, EnvironmentConfig
  from .base_utils import CPU_Unpickler, ModelOutput, hf_hub_is_available, model_card_template
label_desc: Use image node_id 13 for calling the BaseAE obj's underlying member method code with example usage: obj._load_custom_decoder_from_folder(cls, dir_path) and returns: decoder