docstr: Build a KRNN model
  
  Parameters
  ----------
  fea_dim : int
      The feature dimension
  cnn_dim : int
      The hidden dimension of CNN
  cnn_kernel_size : int
      The size of convolutional kernels
  rnn_dim : int
      The hidden dimension of KRNN
  rnn_dups : int
      The number of parallel duplicates
  rnn_layers: int
      The number of RNN layers
docstr_tok: ["Build","a","KRNN","model","Parameters","--","--","--","--","--","fea_dim",":","int","The","feature","dimension","cnn_dim",":","int","The","hidden","dimension","of","CNN","cnn_kernel_size",":","int","The","size","of","convolutional","kernels","rnn_dim",":","int","The","hidden","dimension","of","KRNN","rnn_dups",":","int","The","number","of","parallel","duplicates","rnn_layers",":","int","The","number","of","RNN","layers"]
code: def __init__(
      self,
      fea_dim,
      cnn_dim,
      cnn_kernel_size,
      rnn_dim,
      rnn_dups,
      rnn_layers,
      dropout,
      device,
      **params,
  ):
      """Build a KRNN model
  
      Parameters
      ----------
      fea_dim : int
          The feature dimension
      cnn_dim : int
          The hidden dimension of CNN
      cnn_kernel_size : int
          The size of convolutional kernels
      rnn_dim : int
          The hidden dimension of KRNN
      rnn_dups : int
          The number of parallel duplicates
      rnn_layers: int
          The number of RNN layers
      """
      super().__init__()
  
      self.encoder = CNNKRNNEncoder(
          cnn_input_dim=fea_dim,
          cnn_output_dim=cnn_dim,
          cnn_kernel_size=cnn_kernel_size,
          rnn_output_dim=rnn_dim,
          rnn_dup_num=rnn_dups,
          rnn_layers=rnn_layers,
          dropout=dropout,
          device=device,
      )
  
      self.out_fc = nn.Linear(rnn_dim, 1)
      self.device = device
  
imports: from __future__ import division
  from __future__ import print_function
  import numpy
  import pandas
  from typing import Text, Union
  import copy
  from ...utils import get_or_create_path
  from ...log import get_module_logger
  import torch
  import torch.nn
  import torch.optim
  from ...model.base import Model
  from ...data.dataset import DatasetH
  from ...data.dataset.handler import DataHandlerLP
label_desc: Use image node_id 1 to create a new KRNNModel object from inherited base classes: nn with example: obj = KRNNModel(fea_dim, cnn_dim, cnn_kernel_size, rnn_dim, rnn_dups, rnn_layers, dropout, device)