class_docstr: Character-level CNN encoder to generate word representations, as input to
  transformer encoder.
code: def upgrade_state_dict(self, state_dict):
      if isinstance(
          self.embed_positions, SinusoidalPositionalEmbedding
      ):
          if "encoder.embed_positions.weights" in state_dict:
              del state_dict["encoder.embed_positions.weights"]
          state_dict[
              "encoder.embed_positions._float_tensor"
          ] = torch.FloatTensor(1)
      return state_dict
  
imports: import logging
  import math
  from ast import literal_eval
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq.models import FairseqEncoder, register_model, register_model_architecture, transformer
  from fairseq.modules import SinusoidalPositionalEmbedding
  from pytorch_translate import char_encoder, transformer, utils, vocab_constants
  from pytorch_translate.char_source_model import verify_pretrain_params
  from pytorch_translate.common_layers import TransformerEncoderGivenEmbeddings, VariableTracker
  from pytorch_translate.data.dictionary import TAGS
label_desc: Use image node_id 8 for calling the CharCNNEncoder obj's underlying member method code with example usage: obj.upgrade_state_dict(state_dict) and returns: state_dict