class_docstr: ID-CNN (iterated dilated) tagging model (based on Strubell et al 2017) with word character
  embedding (using CNN feature extractors)
  
  Args:
      word_vocab_size (int): word vocabulary size
      num_labels (int): number of labels (classifier)
      word_embedding_dims (int, optional): word embedding dims
      shape_vocab_size (int, optional): shape vocabulary size
      shape_embedding_dims (int, optional): shape embedding dims
      char_embedding_dims (int, optional): character embedding dims
      char_cnn_filters (int, optional): character CNN kernel size
      char_cnn_kernel_size (int, optional): character CNN number of filters
      cnn_kernel_size (int, optional): CNN embedder kernel size
      cnn_num_filters (int, optional): CNN embedder number of filters
      input_dropout (float, optional): input layer (embedding) dropout rate
      middle_dropout (float, optional): middle layer dropout rate
      hidden_dropout (float, optional): hidden layer dropout rate
      blocks (int, optinal): number of blocks
      dilations (List, optinal): List of dilations per CNN layer
      embedding_pad_idx (int, optional): padding number for embedding layers
      use_chars (bool, optional): whether to use char embedding, defaults to False
      drop_penalty (float, optional): penalty for dropout regularization
class_docstr_tok: ["ID-CNN","(","iterated","dilated",")","tagging","model","(","based","on","Strubell","et","al","2017",")","with","word","character","embedding","(","using","CNN","feature","extractors",")","Args",":","word_vocab_size","(","int",")",":","word","vocabulary","size","num_labels","(","int",")",":","number","of","labels","(","classifier",")","word_embedding_dims","(","int",",","optional",")",":","word","embedding","dims","shape_vocab_size","(","int",",","optional",")",":","shape","vocabulary","size","shape_embedding_dims","(","int",",","optional",")",":","shape","embedding","dims","char_embedding_dims","(","int",",","optional",")",":","character","embedding","dims","char_cnn_filters","(","int",",","optional",")",":","character","CNN","kernel","size","char_cnn_kernel_size","(","int",",","optional",")",":","character","CNN","number","of","filters","cnn_kernel_size","(","int",",","optional",")",":","CNN","embedder","kernel","size","cnn_num_filters","(","int",",","optional",")",":","CNN","embedder","number","of","filters","input_dropout","(","float",",","optional",")",":","input","layer","(","embedding",")","dropout","rate","middle_dropout","(","float",",","optional",")",":","middle","layer","dropout","rate","hidden_dropout","(","float",",","optional",")",":","hidden","layer","dropout","rate","blocks","(","int",",","optinal",")",":","number","of","blocks","dilations","(","List",",","optinal",")",":","List","of","dilations","per","CNN","layer","embedding_pad_idx","(","int",",","optional",")",":","padding","number","for","embedding","layers","use_chars","(","bool",",","optional",")",":","whether","to","use","char","embedding",",","defaults","to","False","drop_penalty","(","float",",","optional",")",":","penalty","for","dropout","regularization"]
docstr: Load pre-defined word embeddings
  
  Args:
      embeddings (torch.tensor): word embedding tensor
docstr_tok: ["Load","pre-defined","word","embeddings","Args",":","embeddings","(","torch.tensor",")",":","word","embedding","tensor"]
code: def load_embeddings(self, embeddings):
      """
      Load pre-defined word embeddings
  
      Args:
          embeddings (torch.tensor): word embedding tensor
      """
      self.word_embeddings = nn.Embedding.from_pretrained(
          embeddings, freeze=False, padding_idx=self.padding_idx
      )
  
file_path: nlp-architect/nlp_architect/nn/torch/modules/embedders.py
imports: import os
  from typing import List
  import torch
  from torch import nn
  import torch.nn.functional
  from nlp_architect.utils.io import load_json_file
  from nlp_architect.utils.text import n_letters
label_desc: Use image node_id 4 for calling the IDCNN obj's underlying member method code with example usage: obj.load_embeddings(embeddings) without return types