class_docstr: Wrapper for character aware CNN embeddings for tokens.
  Attributes:
      embedding (CNNCharacterEmbedding): Character embedding
class_docstr_tok: ["Wrapper","for","character","aware","CNN","embeddings","for","tokens",".","Attributes",":","embedding","(","CNNCharacterEmbedding",")",":","Character","embedding"]
code: def __init__(
      self,
      num_embeddings: int,
      embed_dim: int,
      out_channels: int,
      kernel_sizes: List[int],
      highway_layers: int,
      projection_dim: Optional[int],
      resmlp_layers: int = 0,
      resmlp_dropout: float = 0.1,  # default to pytorch default
      *args,
      **kwargs,
  ) -> None:
      output_dim = CNNCharacterEmbedding.output_dim(
          num_kernels=len(kernel_sizes),
          out_channels=out_channels,
          projection_dim=projection_dim,
      )
      super().__init__(output_dim)
      self.embedding = CNNCharacterEmbedding(
          num_embeddings=num_embeddings,
          embed_dim=embed_dim,
          out_channels=out_channels,
          kernel_sizes=kernel_sizes,
          highway_layers=highway_layers,
          projection_dim=projection_dim,
          resmlp_layers=resmlp_layers,
          resmlp_dropout=resmlp_dropout,
      )
      log_class_usage(__class__)
  
file_path: pytext/pytext/models/embeddings/char_embedding.py
imports: import warnings
  from typing import List, Optional
  import torch
  import torch.nn
  import torch.nn.functional
  from pytext.config.field_config import CharFeatConfig
  from pytext.fields import FieldMeta
  from pytext.utils.usage import log_class_usage
  from pytorch.text.fb.nn.modules.cnn_char_embedding import CNNCharacterEmbedding
  from .embedding_base import EmbeddingBase
label_desc: Use image node_id 2 to create a new CharacterEmbedding object from inherited base classes: EmbeddingBase with example: obj = CharacterEmbedding(num_embeddings, embed_dim, out_channels, kernel_sizes, highway_layers, projection_dim, resmlp_layers, resmlp_dropout)