code: def __init__(
      self,
      d_feat=6,
      hidden_size=64,
      num_layers=2,
      dropout=0.0,
      base_model="GRU",
  ):
      super().__init__()
  
      self.d_feat = d_feat
      self.hidden_size = hidden_size
  
      if base_model == "GRU":
          self.rnn = nn.GRU(
              input_size=d_feat,
              hidden_size=hidden_size,
              num_layers=num_layers,
              batch_first=True,
              dropout=dropout,
          )
      elif base_model == "LSTM":
          self.rnn = nn.LSTM(
              input_size=d_feat,
              hidden_size=hidden_size,
              num_layers=num_layers,
              batch_first=True,
              dropout=dropout,
          )
      else:
          raise ValueError("unknown base model name `%s`" % base_model)
  
      self.fc_es = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_es.weight)
      self.fc_is = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_is.weight)
  
      self.fc_es_middle = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_es_middle.weight)
      self.fc_is_middle = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_is_middle.weight)
  
      self.fc_es_fore = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_es_fore.weight)
      self.fc_is_fore = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_is_fore.weight)
      self.fc_indi_fore = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_indi_fore.weight)
  
      self.fc_es_back = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_es_back.weight)
      self.fc_is_back = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_is_back.weight)
      self.fc_indi = nn.Linear(hidden_size, hidden_size)
      torch.nn.init.xavier_uniform_(self.fc_indi.weight)
  
      self.leaky_relu = nn.LeakyReLU()
      self.softmax_s2t = torch.nn.Softmax(dim=0)
      self.softmax_t2s = torch.nn.Softmax(dim=1)
  
      self.fc_out_es = nn.Linear(hidden_size, 1)
      self.fc_out_is = nn.Linear(hidden_size, 1)
      self.fc_out_indi = nn.Linear(hidden_size, 1)
      self.fc_out = nn.Linear(hidden_size, 1)
  
imports: from __future__ import division
  from __future__ import print_function
  import os
  import numpy
  import pandas
  from typing import Text, Union
  import urllib.request
  import copy
  from ...utils import get_or_create_path
  from ...log import get_module_logger
  import torch
  import torch.nn
  import torch.optim
  from .pytorch_utils import count_parameters
  from ...model.base import Model
  from ...data.dataset import DatasetH
  from ...data.dataset.handler import DataHandlerLP
  from ...contrib.model.pytorch_lstm import LSTMModel
  from ...contrib.model.pytorch_gru import GRUModel
label_desc: Use image node_id 1 to create a new HISTModel object from inherited base classes: nn with example: obj = HISTModel(d_feat, hidden_size, num_layers, dropout, base_model)