code: def __init__(
      self,
      n_classes: int,
      embedding_size: int,
      kernel_sizes_cnn: List[int],
      filters_cnn: Union[int, List[int]],
      dense_size: int,
      dropout_rate: float = 0.0,
      embedded_tokens: bool = True,
      vocab_size: Optional[int] = None,
      **kwargs,
  ):
      super().__init__()
      self.embedded_tokens = embedded_tokens
      self.kernel_sizes_cnn = kernel_sizes_cnn
  
      if not embedded_tokens and vocab_size:
          self.embedding = nn.Embedding(vocab_size, embedding_size)
      if isinstance(filters_cnn, int):
          filters_cnn = len(kernel_sizes_cnn) * [filters_cnn]
  
      for i in range(len(kernel_sizes_cnn)):
          setattr(
              self,
              "conv_" + str(i),
              nn.Conv1d(
                  embedding_size,
                  filters_cnn[i],
                  kernel_sizes_cnn[i],
                  padding=kernel_sizes_cnn[i],
              ),
          )
          setattr(self, "bn_" + str(i), nn.BatchNorm1d(filters_cnn[i]))
          setattr(self, "relu_" + str(i), nn.ReLU())
          setattr(self, "pool_" + str(i), nn.AdaptiveMaxPool1d(1))
  
      self.dropout = nn.Dropout(dropout_rate)
      self.dense = nn.Linear(sum(filters_cnn), dense_size)
      self.relu_dense = nn.ReLU()
      self.final_dense = nn.Linear(dense_size, n_classes)
  
imports: from typing import List, Union, Optional
  import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new ShallowAndWideCnn object from inherited base classes: nn with example: obj = ShallowAndWideCnn(n_classes, embedding_size, kernel_sizes_cnn, filters_cnn, dense_size, dropout_rate, embedded_tokens, vocab_size)