class_docstr: CNN-LSTM embedder (based on Ma and Hovy. 2016)
  
  Args:
      word_vocab_size (int): word vocabulary size
      num_labels (int): number of labels (classifier)
      word_embedding_dims (int, optional): word embedding dims
      char_embedding_dims (int, optional): character embedding dims
      cnn_kernel_size (int, optional): character CNN kernel size
      cnn_num_filters (int, optional): character CNN number of filters
      lstm_hidden_size (int, optional): LSTM embedder hidden size
      lstm_layers (int, optional): num of LSTM layers
      bidir (bool, optional): apply bi-directional LSTM
      dropout (float, optional): dropout rate
      padding_idx (int, optinal): padding number for embedding layers
class_docstr_tok: ["CNN-LSTM","embedder","(","based","on","Ma","and","Hovy",".","2016",")","Args",":","word_vocab_size","(","int",")",":","word","vocabulary","size","num_labels","(","int",")",":","number","of","labels","(","classifier",")","word_embedding_dims","(","int",",","optional",")",":","word","embedding","dims","char_embedding_dims","(","int",",","optional",")",":","character","embedding","dims","cnn_kernel_size","(","int",",","optional",")",":","character","CNN","kernel","size","cnn_num_filters","(","int",",","optional",")",":","character","CNN","number","of","filters","lstm_hidden_size","(","int",",","optional",")",":","LSTM","embedder","hidden","size","lstm_layers","(","int",",","optional",")",":","num","of","LSTM","layers","bidir","(","bool",",","optional",")",":","apply","bi-directional","LSTM","dropout","(","float",",","optional",")",":","dropout","rate","padding_idx","(","int",",","optinal",")",":","padding","number","for","embedding","layers"]
docstr: Load a model from a configuration file
  A valid configuration file is a JSON file with fields as in class `__init__`
  
  Args:
      word_vocab_size (int): word vocabulary size
      num_labels (int): number of labels (classifier)
      config (str): path to configuration file
  
  Returns:
      CNNLSTM: CNNLSTM module pre-configured
docstr_tok: ["Load","a","model","from","a","configuration","file","A","valid","configuration","file","is","a","JSON","file","with","fields","as","in","class","`","__init__","`","Args",":","word_vocab_size","(","int",")",":","word","vocabulary","size","num_labels","(","int",")",":","number","of","labels","(","classifier",")","config","(","str",")",":","path","to","configuration","file","Returns",":","CNNLSTM",":","CNNLSTM","module","pre-configured"]
code: def from_config(
      cls, word_vocab_size: int, num_labels: int, config: str
  ):
      """
      Load a model from a configuration file
      A valid configuration file is a JSON file with fields as in class `__init__`
  
      Args:
          word_vocab_size (int): word vocabulary size
          num_labels (int): number of labels (classifier)
          config (str): path to configuration file
  
      Returns:
          CNNLSTM: CNNLSTM module pre-configured
      """
      if not os.path.exists(config):
          raise FileNotFoundError
      cfg = load_json_file(config)
      return cls(
          word_vocab_size=word_vocab_size, num_labels=num_labels, **cfg
      )
  
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 CNNLSTM obj's underlying member method code with example usage: obj.from_config(cls, word_vocab_size, num_labels, config) and returns: cls