class_docstr: The Recurrent Event Network model from the `"Recurrent Event Network
  for Reasoning over Temporal Knowledge Graphs"
  <https://arxiv.org/abs/1904.05530>`_ paper.
  
  .. math::
      f_{\mathbf{\Theta}}(\mathbf{e}_s, \mathbf{e}_r,
      \mathbf{h}^{(t-1)}(s, r))
  
  based on a RNN encoder
  
  .. math::
      \mathbf{h}^{(t)}(s, r) = \textrm{RNN}(\mathbf{e}_s, \mathbf{e}_r,
      g(\mathcal{O}^{(t)}_r(s)), \mathbf{h}^{(t-1)}(s, r))
  
  where :math:`\mathbf{e}_s` and :math:`\mathbf{e}_r` denote entity and
  relation embeddings, and :math:`\mathcal{O}^{(t)}_r(s)` represents the set
  of objects interacted with subject :math:`s` under relation :math:`r` at
  timestamp :math:`t`.
  This model implements :math:`g` as the **Mean Aggregator** and
  :math:`f_{\mathbf{\Theta}}` as a linear projection.
  
  Args:
      num_nodes (int): The number of nodes in the knowledge graph.
      num_rels (int): The number of relations in the knowledge graph.
      hidden_channels (int): Hidden size of node and relation embeddings.
      seq_len (int): The sequence length of past events.
      num_layers (int, optional): The number of recurrent layers.
          (default: :obj:`1`)
      dropout (float): If non-zero, introduces a dropout layer before the
          final prediction. (default: :obj:`0.`)
      bias (bool, optional): If set to :obj:`False`, all layers will not
          learn an additive bias. (default: :obj:`True`)
class_docstr_tok: ["The","Recurrent","Event","Network","model","from","the","`","``","Recurrent","Event","Network","for","Reasoning","over","Temporal","Knowledge","Graphs","''","<","https",":","\/\/arxiv.org\/abs\/1904.05530",">","`","_","paper",".","..","math",":",":","f_","{","\\mathbf","{","\\Theta","}","}","(","\\mathbf","{","e","}","_s",",","\\mathbf","{","e","}","_r",",","\\mathbf","{","h","}","^","{","(","t-1",")","}","(","s",",","r",")",")","based","on","a","RNN","encoder","..","math",":",":","\\mathbf","{","h","}","^","{","(","t",")","}","(","s",",","r",")","=","\\textrm","{","RNN","}","(","\\mathbf","{","e","}","_s",",","\\mathbf","{","e","}","_r",",","g","(","\\mathcal","{","O","}","^","{","(","t",")","}","_r","(","s",")",")",",","\\mathbf","{","h","}","^","{","(","t-1",")","}","(","s",",","r",")",")","where",":","math",":","`","\\mathbf","{","e","}","_s","`","and",":","math",":","`","\\mathbf","{","e","}","_r","`","denote","entity","and","relation","embeddings",",","and",":","math",":","`","\\mathcal","{","O","}","^","{","(","t",")","}","_r","(","s",")","`","represents","the","set","of","objects","interacted","with","subject",":","math",":","`","s","`","under","relation",":","math",":","`","r","`","at","timestamp",":","math",":","`","t","`",".","This","model","implements",":","math",":","`","g","`","as","the","*","*","Mean","Aggregator","*","*","and",":","math",":","`","f_","{","\\mathbf","{","\\Theta","}","}","`","as","a","linear","projection",".","Args",":","num_nodes","(","int",")",":","The","number","of","nodes","in","the","knowledge","graph",".","num_rels","(","int",")",":","The","number","of","relations","in","the","knowledge","graph",".","hidden_channels","(","int",")",":","Hidden","size","of","node","and","relation","embeddings",".","seq_len","(","int",")",":","The","sequence","length","of","past","events",".","num_layers","(","int",",","optional",")",":","The","number","of","recurrent","layers",".","(","default",":",":","obj",":","`","1","`",")","dropout","(","float",")",":","If","non-zero",",","introduces","a","dropout","layer","before","the","final","prediction",".","(","default",":",":","obj",":","`","0.","`",")","bias","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","False","`",",","all","layers","will","not","learn","an","additive","bias",".","(","default",":",":","obj",":","`","True","`",")"]
code: def reset_parameters(self):
      torch.nn.init.xavier_uniform_(self.ent, gain=math.sqrt(2.0))
      torch.nn.init.xavier_uniform_(self.rel, gain=math.sqrt(2.0))
  
      self.sub_gru.reset_parameters()
      self.obj_gru.reset_parameters()
      self.sub_lin.reset_parameters()
      self.obj_lin.reset_parameters()
  
file_path: pytorch_geometric/torch_geometric/nn/models/re_net.py
imports: import math
  from typing import Callable, List, Tuple
  import torch
  import torch.nn.functional
  from torch import Tensor
  from torch.nn import GRU, Linear, Parameter
  from torch_geometric.data.data import Data
  from torch_geometric.utils import scatter
label_desc: Use image node_id 2 for calling the RENet obj's underlying member method code with example usage: obj.reset_parameters() without return types