class_docstr: This is the base class for all autoencoders, including image autoencoders, image autoencoders with discriminators,
  unCLIP models, etc. Hence, it is fairly general, and specific features
  (e.g. discriminator training, encoding, decoding) must be implemented in subclasses.
class_docstr_tok: ["This","is","the","base","class","for","all","autoencoders",",","including","image","autoencoders",",","image","autoencoders","with","discriminators",",","unCLIP","models",",","etc",".","Hence",",","it","is","fairly","general",",","and","specific","features","(","e.g",".","discriminator","training",",","encoding",",","decoding",")","must","be","implemented","in","subclasses","."]
code: def instantiate_optimizer_from_config(self, params, lr, cfg):
      logpy.info(
          f"loading >>> {cfg['target']} <<< optimizer from config"
      )
      return get_obj_from_str(cfg["target"])(
          params, lr=lr, **cfg.get("params", dict())
      )
  
imports: import logging
  import math
  import re
  from abc import abstractmethod
  from contextlib import contextmanager
  from typing import Any, Dict, List, Optional, Tuple, Union
  import pytorch_lightning
  import torch
  import torch.nn
  from einops import rearrange
  from packaging import version
  from ..modules.autoencoding.regularizers import AbstractRegularizer
  from ..modules.ema import LitEma
  from ..util import default, get_nested_attribute, get_obj_from_str, instantiate_from_config
label_desc: Use image node_id 8 for calling the AbstractAutoencoder obj's underlying member method code with example usage: obj.instantiate_optimizer_from_config(params, lr, cfg) and returns: get_obj_from_str