class_docstr: Temporal Routing Adaptor (TRA)
  
  TRA takes historical prediction errors & latent representation as inputs,
  then routes the input sample to a specific predictor for training & inference.
  
  Args:
      input_size (int): input size (RNN/Transformer's hidden size)
      num_states (int): number of latent states (i.e., trading patterns)
          If `num_states=1`, then TRA falls back to traditional methods
      hidden_size (int): hidden size of the router
      tau (float): gumbel softmax temperature
      src_info (str): information for the router
class_docstr_tok: ["Temporal","Routing","Adaptor","(","TRA",")","TRA","takes","historical","prediction","errors","&","latent","representation","as","inputs",",","then","routes","the","input","sample","to","a","specific","predictor","for","training","&","inference",".","Args",":","input_size","(","int",")",":","input","size","(","RNN\/Transformer","'s","hidden","size",")","num_states","(","int",")",":","number","of","latent","states","(","i.e.",",","trading","patterns",")","If","`","num_states=1","`",",","then","TRA","falls","back","to","traditional","methods","hidden_size","(","int",")",":","hidden","size","of","the","router","tau","(","float",")",":","gumbel","softmax","temperature","src_info","(","str",")",":","information","for","the","router"]
code: def reset_parameters(self):
      for child in self.children():
          child.reset_parameters()
  
imports: import io
  import os
  import copy
  import math
  import json
  import numpy
  import pandas
  import matplotlib.pyplot
  import torch
  import torch.nn
  import torch.optim
  import torch.nn.functional
  from tqdm import tqdm
  from qlib.constant import EPS
  from qlib.log import get_module_logger
  from qlib.model.base import Model
  from qlib.contrib.data.dataset import MTSDatasetH
label_desc: Use image node_id 2 for calling the TRA obj's underlying member method code with example usage: obj.reset_parameters() without return types