class_docstr: An implementation of the graph learning layer to construct an adjacency matrix.
  For details see this paper: `"Connecting the Dots: Multivariate Time Series Forecasting with Graph Neural Networks."
  <https://arxiv.org/pdf/2005.11650.pdf>`_
  
  Args:
      nnodes (int): Number of nodes in the graph.
      k (int): Number of largest values to consider in constructing the neighbourhood of a node (pick the "nearest" k nodes).
      dim (int): Dimension of the node embedding.
      alpha (float, optional): Tanh alpha for generating adjacency matrix, alpha controls the saturation rate
      xd (int, optional): Static feature dimension, default None.
class_docstr_tok: ["An","implementation","of","the","graph","learning","layer","to","construct","an","adjacency","matrix",".","For","details","see","this","paper",":","`","``","Connecting","the","Dots",":","Multivariate","Time","Series","Forecasting","with","Graph","Neural","Networks",".","''","<","https",":","\/\/arxiv.org\/pdf\/2005.11650.pdf",">","`","_","Args",":","nnodes","(","int",")",":","Number","of","nodes","in","the","graph",".","k","(","int",")",":","Number","of","largest","values","to","consider","in","constructing","the","neighbourhood","of","a","node","(","pick","the","``","nearest","''","k","nodes",")",".","dim","(","int",")",":","Dimension","of","the","node","embedding",".","alpha","(","float",",","optional",")",":","Tanh","alpha","for","generating","adjacency","matrix",",","alpha","controls","the","saturation","rate","xd","(","int",",","optional",")",":","Static","feature","dimension",",","default","None","."]
code: def __init__(
      self,
      nnodes: int,
      k: int,
      dim: int,
      alpha: float,
      xd: Optional[int] = None,
  ):
      super(GraphConstructor, self).__init__()
      if xd is not None:
          self._static_feature_dim = xd
          self._linear1 = nn.Linear(xd, dim)
          self._linear2 = nn.Linear(xd, dim)
      else:
          self._embedding1 = nn.Embedding(nnodes, dim)
          self._embedding2 = nn.Embedding(nnodes, dim)
          self._linear1 = nn.Linear(dim, dim)
          self._linear2 = nn.Linear(dim, dim)
  
      self._k = k
      self._alpha = alpha
  
      self._reset_parameters()
  
imports: from __future__ import division
  import numbers
  from typing import Optional
  import torch
  import torch.nn
  from torch.nn import init
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new GraphConstructor object from inherited base classes: nn with example: obj = GraphConstructor(nnodes, k, dim, alpha, xd)