class_docstr: The GNN-Explainer model from the `"GNNExplainer: Generating
  Explanations for Graph Neural Networks"
  <https://arxiv.org/abs/1903.03894>`_ paper for identifying compact subgraph
  structures and small subsets node features that play a crucial role in a
  GNN’s node-predictions.
  .. note:: For an example, see `benchmarks/xgraph
      <https://github.com/divelab/DIG/tree/dig/benchmarks/xgraph>`_.
  Args:
      model (torch.nn.Module): The GNN module to explain.
      epochs (int, optional): The number of epochs to train.
          (default: :obj:`100`)
      lr (float, optional): The learning rate to apply.
          (default: :obj:`0.01`)
      explain_graph (bool, optional): Whether to explain graph classification model
          (default: :obj:`False`)
      indirect_graph_symmetric_weights (bool, optional): If `True`, then the explainer
          will first realize whether this graph input has indirect edges, 
          then makes its edge weights symmetric. (default: :obj:`False`)
class_docstr_tok: ["The","GNN-Explainer","model","from","the","`","``","GNNExplainer",":","Generating","Explanations","for","Graph","Neural","Networks","''","<","https",":","\/\/arxiv.org\/abs\/1903.03894",">","`","_","paper","for","identifying","compact","subgraph","structures","and","small","subsets","node","features","that","play","a","crucial","role","in","a","GNN","\u2019","s","node-predictions",".","..","note",":",":","For","an","example",",","see","`","benchmarks\/xgraph","<","https",":","\/\/github.com\/divelab\/DIG\/tree\/dig\/benchmarks\/xgraph",">","`","_",".","Args",":","model","(","torch.nn.Module",")",":","The","GNN","module","to","explain",".","epochs","(","int",",","optional",")",":","The","number","of","epochs","to","train",".","(","default",":",":","obj",":","`","100","`",")","lr","(","float",",","optional",")",":","The","learning","rate","to","apply",".","(","default",":",":","obj",":","`","0.01","`",")","explain_graph","(","bool",",","optional",")",":","Whether","to","explain","graph","classification","model","(","default",":",":","obj",":","`","False","`",")","indirect_graph_symmetric_weights","(","bool",",","optional",")",":","If","`","True","`",",","then","the","explainer","will","first","realize","whether","this","graph","input","has","indirect","edges",",","then","makes","its","edge","weights","symmetric",".","(","default",":",":","obj",":","`","False","`",")"]
code: def __repr__(self):
      return f"{self.__class__.__name__}()"
  
file_path: DIG/dig/xgraph/method/gnnexplainer.py
imports: import torch
  from torch import Tensor
  from torch_geometric.utils.loop import add_remaining_self_loops
  from dig.version import debug
  from ..models.utils import subgraph
  from .utils import symmetric_edge_mask_indirect_graph
  from torch.nn.functional import cross_entropy
  from .base_explainer import ExplainerBase
  from typing import Union
label_desc: Use image node_id 5 for calling the GNNExplainer obj's underlying member method code with example usage: obj.__repr__() and returns: self, str