Skip to content

Commit

Permalink
to_captum_model: Minor fix to docs (#6031)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsad1 authored Nov 22, 2022
1 parent a76d897 commit 8f2dc12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions torch_geometric/nn/models/explainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def to_captum_input(x: Union[Tensor, Dict[EdgeType, Tensor]],
r"""Given :obj:`x`, :obj:`edge_index` and :obj:`mask_type`, converts it
to a format to use in `Captum.ai <https://captum.ai/>`_ attribution
methods. Returns :obj:`inputs` and :obj:`additional_forward_args`
required for `Captum's :obj:`attribute` functions.
required for `Captum`'s :obj:`attribute` functions.
See :obj:`torch_geometric.nn.to_captum_model` for example usage.
Args:
Expand Down Expand Up @@ -293,8 +293,8 @@ def captum_output_to_dicts(
:obj:`[num_nodes, num_features]` and no edge attribution.
3. :obj:`"node_and_edge"`: :obj:`captum_attrs` contains only node
attributions. The returned tuple contains node attribution
dictionary followed by edge attribution dictionary.
attributions. The returned tuple contains node attribution
dictionary followed by edge attribution dictionary.
metadata (Metadata): The metadata of the heterogeneous graph.
"""
Expand Down Expand Up @@ -397,7 +397,7 @@ def to_captum_model(
target=int(y[output_idx]),
additional_forward_args=additional_forward_args,
internal_batch_size=1)
ig_attr_dict = captum_output_to_dicts(ig_attr, mask_type, metadata)
edge_attr_dict = captum_output_to_dicts(ig_attr, mask_type, metadata)
.. note::
Expand Down

0 comments on commit 8f2dc12

Please sign in to comment.