class_docstr: A mixin class for all pre-trained classes to inherit.
      
class_docstr_tok: ["A","mixin","class","for","all","pre-trained","classes","to","inherit","."]
docstr: Load paths and configurations of the pre-trained model.
  
  Args:
      pretrained_model_name (optional): A str with the name
          of a pre-trained model to load. If `None`, will use the model
          name in :attr:`hparams`.
      cache_dir (optional): The path to a folder in which the
          pre-trained models will be cached. If `None` (default),
          a default directory will be used.
      hparams (dict or HParams, optional): Hyperparameters. Missing
          hyperparameter will be set to default values. See
          :meth:`default_hparams` for the hyperparameter structure
          and default values.
docstr_tok: ["Load","paths","and","configurations","of","the","pre-trained","model",".","Args",":","pretrained_model_name","(","optional",")",":","A","str","with","the","name","of","a","pre-trained","model","to","load",".","If","`","None","`",",","will","use","the","model","name","in",":","attr",":","`","hparams","`",".","cache_dir","(","optional",")",":","The","path","to","a","folder","in","which","the","pre-trained","models","will","be","cached",".","If","`","None","`","(","default",")",",","a","default","directory","will","be","used",".","hparams","(","dict","or","HParams",",","optional",")",":","Hyperparameters",".","Missing","hyperparameter","will","be","set","to","default","values",".","See",":","meth",":","`","default_hparams","`","for","the","hyperparameter","structure","and","default","values","."]
code: def load_pretrained_config(
      self, pretrained_model_name=None, cache_dir=None, hparams=None
  ):
      r"""Load paths and configurations of the pre-trained model.
  
      Args:
          pretrained_model_name (optional): A str with the name
              of a pre-trained model to load. If `None`, will use the model
              name in :attr:`hparams`.
          cache_dir (optional): The path to a folder in which the
              pre-trained models will be cached. If `None` (default),
              a default directory will be used.
          hparams (dict or HParams, optional): Hyperparameters. Missing
              hyperparameter will be set to default values. See
              :meth:`default_hparams` for the hyperparameter structure
              and default values.
      """
      if not hasattr(self, "_hparams"):
          self._hparams = HParams(hparams, self.default_hparams())
      else:
          # Probably already parsed by subclasses. We rely on subclass
          # implementations to get this right.
          # As a sanity check, we require `hparams` to be `None` in this case.
          if hparams is not None:
              raise ValueError(
                  "`self._hparams` is already assigned, but `hparams` "
                  "argument is not None."
              )
  
      self.pretrained_model_dir = None
      self.pretrained_model_name = pretrained_model_name
  
      if self.pretrained_model_name is None:
          self.pretrained_model_name = (
              self._hparams.pretrained_model_name
          )
      if self.pretrained_model_name is not None:
          self.pretrained_model_dir = self.download_checkpoint(
              self.pretrained_model_name, cache_dir
          )
          pretrained_model_hparams = self._transform_config(
              self.pretrained_model_name, self.pretrained_model_dir
          )
          self._hparams = HParams(
              pretrained_model_hparams, self._hparams.todict()
          )
  
imports: import os
  import sys
  from abc import ABCMeta, abstractmethod
  from pathlib import Path
  from texar.tf.data.data_utils import maybe_download
  from texar.tf.hyperparams import HParams
  from texar.tf.module_base import ModuleBase
label_desc: Use image node_id 3 for calling the PretrainedMixin obj's underlying member method code with example usage: obj.load_pretrained_config(pretrained_model_name, cache_dir, hparams) without return types