class_docstr: The time-encoding function from the `"Do We Really Need Complicated
  Model Architectures for Temporal Networks?"
  <https://openreview.net/forum?id=ayPPc0SyLv1>`_ paper.
  
  It first maps each entry to a vector with exponentially decreasing values,
  and then uses the cosine function to project all values to range
  :math:`[-1, 1]`.
  
  .. math::
      y_{i} = \cos \left(x \cdot \sqrt{d}^{-(i - 1)/\sqrt{d}} \right)
  
  where :math:`d` defines the output feature dimension, and
  :math:`1 \leq i \leq d`.
  
  Args:
      out_channels (int): Size :math:`d` of each output sample.
class_docstr_tok: ["The","time-encoding","function","from","the","`","``","Do","We","Really","Need","Complicated","Model","Architectures","for","Temporal","Networks","?","''","<","https",":","\/\/openreview.net\/forum","?","id=ayPPc0SyLv1",">","`","_","paper",".","It","first","maps","each","entry","to","a","vector","with","exponentially","decreasing","values",",","and","then","uses","the","cosine","function","to","project","all","values","to","range",":","math",":","`","[","-1",",","1","]","`",".","..","math",":",":","y_","{","i","}","=","\\cos","\\left","(","x","\\cdot","\\sqrt","{","d","}","^","{","-","(","i","-","1",")","\/\\sqrt","{","d","}","}","\\right",")","where",":","math",":","`","d","`","defines","the","output","feature","dimension",",","and",":","math",":","`","1","\\leq","i","\\leq","d","`",".","Args",":","out_channels","(","int",")",":","Size",":","math",":","`","d","`","of","each","output","sample","."]
code: def __repr__(self) -> str:
      return f"{self.__class__.__name__}({self.out_channels})"
  
file_path: pytorch_geometric/torch_geometric/nn/encoding.py
imports: import math
  import torch
  from torch import Tensor
label_desc: Use image node_id 4 for calling the TemporalEncoding obj's underlying member method code with example usage: obj.__repr__() and returns: self, str, self, str