class_docstr: Character-level CNN encoder to generate word representations, as input to
  RNN encoder.
docstr: This allows adversarial trainer to turn on and off embedding noising
  layers. In regular training, this mode is off, and it is not included
  in forward pass.
docstr_tok: ["This","allows","adversarial","trainer","to","turn","on","and","off","embedding","noising","layers",".","In","regular","training",",","this","mode","is","off",",","and","it","is","not","included","in","forward","pass","."]
code: def set_embed_noising_mode(self, mode=True):
      """This allows adversarial trainer to turn on and off embedding noising
      layers. In regular training, this mode is off, and it is not included
      in forward pass.
      """
      self.embed_noising_mode = mode
  
imports: import logging
  from ast import literal_eval
  import torch
  import torch.nn.functional
  from fairseq.models import FairseqEncoder, register_model, register_model_architecture
  from pytorch_translate import char_encoder, model_constants, rnn, utils, vocab_constants
  from pytorch_translate.common_layers import Embedding, VariableTracker
  from pytorch_translate.data.dictionary import TAGS
label_desc: Use image node_id 3 for calling the CharCNNEncoder obj's underlying member method code with example usage: obj.set_embed_noising_mode(mode) without return types