class_docstr: A global configuration object for HPO.
  
  To access the hpo config, use "bigdl.nano.automl.hpo_config".
  E.g., to enable hpo tf, use "bigd.nano.automl.hpo_config.enable_hpo_tf()"
class_docstr_tok: ["A","global","configuration","object","for","HPO",".","To","access","the","hpo","config",",","use","``","bigdl.nano.automl.hpo_config","''",".","E.g.",",","to","enable","hpo","tf",",","use","``","bigd.nano.automl.hpo_config.enable_hpo_tf","(",")","''"]
code: def _add_decorated_nano_tf_modules(self):
      # register decorated activations
      import bigdl.nano.tf.keras.activations as nano_activations
  
      # self.backup_module_symtab(
      #     vars(nano_activations),
      #     self._backup_tf_activations)
      self.added_tf_activations = register_module(
          vars(nano_activations),
          HPOConfig.TF_ACTIVATION_MODULE,
          include_types=COMPONENT_TYPE.FUNC,
          exclude_names=HPOConfig.TF_ACTIVATION_EXCLUDE,
      )
  
      # register decorated layers
      import bigdl.nano.tf.keras.layers as nano_layers
  
      # register tf.keras.layers except nano defined layers
      self.added_tf_layers = register_module(
          vars(nano_layers),
          HPOConfig.TF_LAYER_MODULES,
          include_types=COMPONENT_TYPE.CLASS,
          exclude_names=HPOConfig.NANO_DEFINED_TF_LAYERS,
      )
  
      # backup the original nano defined layers and replace
      # them with decorated layers,
      # TODO auto detect the layers that's been defined in nano.tf.keras
      # instead of using a fixed list NANO_DEFINED_TF_LAYERS
      self._backup_existing_components(
          vars(nano_layers),
          subcomponents=HPOConfig.NANO_DEFINED_TF_LAYERS,
          namespace="layers",
      )
      register_module_simple(
          vars(nano_layers),
          subcomponents=HPOConfig.NANO_DEFINED_TF_LAYERS,
          component_type=COMPONENT_TYPE.CLASS,
          module="bigdl.nano.tf.keras.layers",
      )
      self.added_tf_layers.extend(HPOConfig.NANO_DEFINED_TF_LAYERS)
  
      # register decorated tf.cast
      import bigdl.nano.tf
  
      register_module_simple(
          vars(bigdl.nano.tf),
          subcomponents=HPOConfig.TF_FUNCS,
          component_type=COMPONENT_TYPE.FUNC,
          module="tensorflow",
      )
  
      # register decorated tf.keras.Input
      import bigdl.nano.tf.keras
  
      register_module_simple(
          vars(bigdl.nano.tf.keras),
          subcomponents=HPOConfig.TF_KERAS_FUNCS,
          component_type=COMPONENT_TYPE.FUNC,
          module="tensorflow.keras",
      )
  
      # register decoratred tf.keras.optimizers.*
      import bigdl.nano.tf.optimizers as nano_optimizers
  
      register_module_simple(
          vars(nano_optimizers),
          subcomponents=HPOConfig.TF_OPTIMIZERS,
          component_type=COMPONENT_TYPE.CLASS,
          module="tensorflow.keras.optimizers",
      )
  
      # backup nano defined optimizer and replace them
      self._backup_existing_components(
          vars(nano_optimizers),
          subcomponents=HPOConfig.NANO_DEFINED_TF_OPTIMIZERS,
          namespace="optimizers",
      )
      register_module_simple(
          vars(nano_optimizers),
          subcomponents=HPOConfig.NANO_DEFINED_TF_OPTIMIZERS,
          component_type=COMPONENT_TYPE.CLASS,
          module="bigdl.nano.tf.optimizers",
      )
  
file_path: BigDL/python/nano/src/bigdl/nano/automl/hpo/config.py
imports: import importlib
  from bigdl.nano.automl.utils.register_modules import COMPONENT_TYPE, register_module, register_module_simple, clean_modules_simple
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 13 for calling the HPOConfig obj's underlying member method code with example usage: obj._add_decorated_nano_tf_modules() without return types