class_docstr: The Weisfeiler Lehman (WL) operator from the `"A Reduction of a Graph
  to a Canonical Form and an Algebra Arising During this Reduction"
  <https://www.iti.zcu.cz/wl2018/pdf/wl_paper_translation.pdf>`_ paper.
  
  :class:`WLConv` iteratively refines node colorings according to:
  
  .. math::
      \mathbf{x}^{\prime}_i = \textrm{hash} \left( \mathbf{x}_i, \{
      \mathbf{x}_j \colon j \in \mathcal{N}(i) \} \right)
  
  Shapes:
      - **input:**
        node coloring :math:`(|\mathcal{V}|, F_{in})` *(one-hot encodings)*
        or :math:`(|\mathcal{V}|)` *(integer-based)*,
        edge indices :math:`(2, |\mathcal{E}|)`
      - **output:** node coloring :math:`(|\mathcal{V}|)` *(integer-based)*
class_docstr_tok: ["The","Weisfeiler","Lehman","(","WL",")","operator","from","the","`","``","A","Reduction","of","a","Graph","to","a","Canonical","Form","and","an","Algebra","Arising","During","this","Reduction","''","<","https",":","\/\/www.iti.zcu.cz\/wl2018\/pdf\/wl_paper_translation.pdf",">","`","_","paper",".",":","class",":","`","WLConv","`","iteratively","refines","node","colorings","according","to",":","..","math",":",":","\\mathbf","{","x","}","^","{","\\prime","}","_i","=","\\textrm","{","hash","}","\\left","(","\\mathbf","{","x","}","_i",",","\\","{","\\mathbf","{","x","}","_j","\\colon","j","\\in","\\mathcal","{","N","}","(","i",")","\\","}","\\right",")","Shapes",":","-","*","*","input",":","*","*","node","coloring",":","math",":","`","(","|\\mathcal","{","V","}","|",",","F_","{","in","}",")","`","*","(","one-hot","encodings",")","*","or",":","math",":","`","(","|\\mathcal","{","V","}","|",")","`","*","(","integer-based",")","*",",","edge","indices",":","math",":","`","(","2",",","|\\mathcal","{","E","}","|",")","`","-","*","*","output",":","*","*","node","coloring",":","math",":","`","(","|\\mathcal","{","V","}","|",")","`","*","(","integer-based",")","*"]
code: def __init__(self):
      super().__init__()
      self.hashmap = {}
  
file_path: pytorch_geometric/torch_geometric/nn/conv/wl_conv.py
imports: from typing import Optional
  import torch
  from torch import Tensor
  from torch_geometric.typing import Adj
  from torch_geometric.utils import degree, is_sparse, scatter, sort_edge_index, to_edge_index
label_desc: Use image node_id 1 to create a new WLConv object from inherited base classes: torch.nn with example: obj = WLConv()