docstr: Context manager which temporarily freezes embedding, decoder, and log_softmax modules,
  yields control and finally unfreezes the modules.
docstr_tok: ["Context","manager","which","temporarily","freezes","embedding",",","decoder",",","and","log_softmax","modules",",","yields","control","and","finally","unfreezes","the","modules","."]
code: def as_frozen(self):
      """
      Context manager which temporarily freezes embedding, decoder, and log_softmax modules,
      yields control and finally unfreezes the modules.
      """
      self.freeze()
  
      try:
          yield
      finally:
          self.unfreeze()
  
imports: from contextlib import contextmanager
  import torch
  from nemo.collections.common.parts import NEG_INF, mask_padded_tokens
label_desc: Use image node_id 12 for calling the EnsembleBeamSearchSequenceGenerator obj's underlying member method code with example usage: obj.as_frozen() without return types