class_docstr: Allows access to output of intermediate layers of a model
class_docstr_tok: ["Allows","access","to","output","of","intermediate","layers","of","a","model"]
docstr: Reset the registries of all named sub-modules
docstr_tok: ["Reset","the","registries","of","all","named","sub-modules"]
code: def reset_registry(
      self: torch.nn.Module, registry_key: Optional[str] = None
  ):
      """
      Reset the registries of all named sub-modules
      """
      if hasattr(self, "_registry"):
          if registry_key is None:
              self._registry.clear()
          else:
              if registry_key in self._registry:
                  self._registry.pop(registry_key)
              else:
                  raise KeyError(
                      f"Registry key `{registry_key}` provided, but registry does not have this key.\n"
                      f"Available keys in registry : {list(self._registry.keys())}"
                  )
  
      for _, m in self.named_modules():
          if hasattr(m, "_registry"):
              if registry_key is None:
                  m._registry.clear()
              else:
                  if registry_key in self._registry:
                      self._registry.pop(registry_key)
                  else:
                      raise KeyError(
                          f"Registry key `{registry_key}` provided, but registry does not have this key.\n"
                          f"Available keys in registry : {list(self._registry.keys())}"
                      )
  
      # Explicitly disable registry cache after reset
      AccessMixin.set_access_enabled(access_enabled=False)
  
file_path: NeMo/nemo/core/classes/mixins/access_mixins.py
imports: from abc import ABC
  from typing import Optional
  import torch
  from omegaconf import DictConfig
label_desc: Use image node_id 4 for calling the AccessMixin obj's underlying member method code with example usage: obj.reset_registry(registry_key) without return types