class_docstr: Description
  -----------
  Compute edge sparsemax. For a node :math:`i`, edge sparsemax is an operation that computes
  
  .. math::
    a_{ij} = \text{ReLU}(z_{ij} - \tau(\z_{i,:}))
  
  where :math:`z_{ij}` is a signal of edge :math:`j\rightarrow i`, also
  called logits in the context of sparsemax. :math:`\tau` is a function
  that can be found at the `From Softmax to Sparsemax <https://arxiv.org/pdf/1602.02068.pdf>`
  paper.
  
  Parameters
  ----------
  graph : DGLGraph
      The graph to perform edge sparsemax on.
  logits : torch.Tensor
      The input edge feature.
  eids : torch.Tensor or ALL, optional
      A tensor of edge index on which to apply edge sparsemax. If ALL, apply edge
      sparsemax on all edges in the graph. Default: ALL.
  norm_by : str, could be 'src' or 'dst'
      Normalized by source nodes of destination nodes. Default: `dst`.
  
  NOTE: currently only homogeneous graphs are supported.
  
  Returns
  -------
  Tensor
      Sparsemax value.
class_docstr_tok: ["Description","--","--","--","--","--","-","Compute","edge","sparsemax",".","For","a","node",":","math",":","`","i","`",",","edge","sparsemax","is","an","operation","that","computes","..","math",":",":","a_","{","ij","}","=","\\text","{","ReLU","}","(","z_","{","ij","}","-","\\tau","(","\\z_","{","i",",",":","}",")",")","where",":","math",":","`","z_","{","ij","}","`","is","a","signal","of","edge",":","math",":","`","j\\rightarrow","i","`",",","also","called","logits","in","the","context","of","sparsemax",".",":","math",":","`","\\tau","`","is","a","function","that","can","be","found","at","the","`","From","Softmax","to","Sparsemax","<","https",":","\/\/arxiv.org\/pdf\/1602.02068.pdf",">","`","paper",".","Parameters","--","--","--","--","--","graph",":","DGLGraph","The","graph","to","perform","edge","sparsemax","on",".","logits",":","torch.Tensor","The","input","edge","feature",".","eids",":","torch.Tensor","or","ALL",",","optional","A","tensor","of","edge","index","on","which","to","apply","edge","sparsemax",".","If","ALL",",","apply","edge","sparsemax","on","all","edges","in","the","graph",".","Default",":","ALL",".","norm_by",":","str",",","could","be","'src","'","or","'dst'","Normalized","by","source","nodes","of","destination","nodes",".","Default",":","`","dst","`",".","NOTE",":","currently","only","homogeneous","graphs","are","supported",".","Returns","--","--","--","-","Tensor","Sparsemax","value","."]
code: def __init__(self):
      super(EdgeSparsemax, self).__init__()
  
file_path: dgl/examples/pytorch/hgp_sl/functions.py
imports: import dgl
  import torch
  from dgl.backend import astype
  from dgl.base import ALL, is_all
  from dgl.heterograph_index import HeteroGraphIndex
  from dgl.sparse import _gsddmm, _gspmm
  from torch import Tensor
  from torch.autograd import Function
label_desc: Use image node_id 1 to create a new EdgeSparsemax object from inherited base classes: torch.nn with example: obj = EdgeSparsemax()