Skip to content

Commit

Permalink
deploy: 430793e
Browse files Browse the repository at this point in the history
  • Loading branch information
facebook-github-bot committed Aug 1, 2024
1 parent c31f330 commit 7ea48bd
Show file tree
Hide file tree
Showing 182 changed files with 2,062 additions and 2,362 deletions.
2 changes: 1 addition & 1 deletion _sphinx/searchindex.js

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions api/_modules/captum/_utils/models/linear_model/model.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,15 @@ <h1>Source code for captum._utils.models.linear_model.model</h1><div class="high
<div aria-label="Main" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../../../../index.html">Captum</a></h1>
<h3>Navigation</h3>
<search id="searchbox" role="search" style="display: none">
<div class="searchformwrapper">
<form action="../../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" placeholder="Search" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../../attribution.html">Attribution</a></li>
Expand Down Expand Up @@ -447,16 +455,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<search id="searchbox" role="search" style="display: none">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form action="../../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
Expand Down
20 changes: 9 additions & 11 deletions api/_modules/captum/_utils/models/linear_model/model/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,15 @@ <h1>Source code for captum._utils.models.linear_model.model</h1><div class="high
<div aria-label="Main" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../../../../index.html">Captum</a></h1>
<h3>Navigation</h3>
<search id="searchbox" role="search" style="display: none">
<div class="searchformwrapper">
<form action="../../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" placeholder="Search" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../../attribution.html">Attribution</a></li>
Expand Down Expand Up @@ -447,16 +455,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<search id="searchbox" role="search" style="display: none">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form action="../../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
Expand Down
20 changes: 9 additions & 11 deletions api/_modules/captum/_utils/models/model.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@ <h1>Source code for captum._utils.models.model</h1><div class="highlight"><pre>
<div aria-label="Main" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../../../index.html">Captum</a></h1>
<h3>Navigation</h3>
<search id="searchbox" role="search" style="display: none">
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" placeholder="Search" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../attribution.html">Attribution</a></li>
Expand Down Expand Up @@ -142,16 +150,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<search id="searchbox" role="search" style="display: none">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
Expand Down
20 changes: 9 additions & 11 deletions api/_modules/captum/_utils/models/model/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@ <h1>Source code for captum._utils.models.model</h1><div class="highlight"><pre>
<div aria-label="Main" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../../../index.html">Captum</a></h1>
<h3>Navigation</h3>
<search id="searchbox" role="search" style="display: none">
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" placeholder="Search" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../attribution.html">Attribution</a></li>
Expand Down Expand Up @@ -142,16 +150,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<search id="searchbox" role="search" style="display: none">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
Expand Down
20 changes: 9 additions & 11 deletions api/_modules/captum/attr/_core/deep_lift.html
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,15 @@ <h1>Source code for captum.attr._core.deep_lift</h1><div class="highlight"><pre>
<div aria-label="Main" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../../../index.html">Captum</a></h1>
<h3>Navigation</h3>
<search id="searchbox" role="search" style="display: none">
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" placeholder="Search" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../attribution.html">Attribution</a></li>
Expand Down Expand Up @@ -1133,16 +1141,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<search id="searchbox" role="search" style="display: none">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
Expand Down
20 changes: 9 additions & 11 deletions api/_modules/captum/attr/_core/deep_lift/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,15 @@ <h1>Source code for captum.attr._core.deep_lift</h1><div class="highlight"><pre>
<div aria-label="Main" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../../../index.html">Captum</a></h1>
<h3>Navigation</h3>
<search id="searchbox" role="search" style="display: none">
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" placeholder="Search" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../attribution.html">Attribution</a></li>
Expand Down Expand Up @@ -1133,16 +1141,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<search id="searchbox" role="search" style="display: none">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
Expand Down
20 changes: 9 additions & 11 deletions api/_modules/captum/attr/_core/feature_ablation.html
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,15 @@ <h1>Source code for captum.attr._core.feature_ablation</h1><div class="highlight
<div aria-label="Main" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../../../index.html">Captum</a></h1>
<h3>Navigation</h3>
<search id="searchbox" role="search" style="display: none">
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" placeholder="Search" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../attribution.html">Attribution</a></li>
Expand Down Expand Up @@ -876,16 +884,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<search id="searchbox" role="search" style="display: none">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
Expand Down
20 changes: 9 additions & 11 deletions api/_modules/captum/attr/_core/feature_ablation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,15 @@ <h1>Source code for captum.attr._core.feature_ablation</h1><div class="highlight
<div aria-label="Main" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../../../index.html">Captum</a></h1>
<h3>Navigation</h3>
<search id="searchbox" role="search" style="display: none">
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" placeholder="Search" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../attribution.html">Attribution</a></li>
Expand Down Expand Up @@ -876,16 +884,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<search id="searchbox" role="search" style="display: none">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
Expand Down
47 changes: 36 additions & 11 deletions api/_modules/captum/attr/_core/feature_permutation.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h1>Source code for captum.attr._core.feature_permutation</h1><div class="highli
<span class="kn">from</span> <span class="nn">captum.attr._core.feature_ablation</span> <span class="kn">import</span> <span class="n">FeatureAblation</span>
<span class="kn">from</span> <span class="nn">captum.log</span> <span class="kn">import</span> <span class="n">log_usage</span>
<span class="kn">from</span> <span class="nn">torch</span> <span class="kn">import</span> <span class="n">Tensor</span>
<span class="kn">from</span> <span class="nn">torch.futures</span> <span class="kn">import</span> <span class="n">Future</span>


<span class="k">def</span> <span class="nf">_permute_feature</span><span class="p">(</span><span class="n">x</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">,</span> <span class="n">feature_mask</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Tensor</span><span class="p">:</span>
Expand Down Expand Up @@ -120,6 +121,7 @@ <h1>Source code for captum.attr._core.feature_permutation</h1><div class="highli
<span class="sd"> """</span>
<span class="n">FeatureAblation</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">forward_func</span><span class="o">=</span><span class="n">forward_func</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">perm_func</span> <span class="o">=</span> <span class="n">perm_func</span>
<span class="bp">self</span><span class="o">.</span><span class="n">use_futures</span> <span class="o">=</span> <span class="kc">False</span>

<span class="c1"># suppressing error caused by the child class not having a matching</span>
<span class="c1"># signature to the parent</span>
Expand Down Expand Up @@ -308,6 +310,31 @@ <h1>Source code for captum.attr._core.feature_permutation</h1><div class="highli
<span class="p">)</span></div>


<span class="k">def</span> <span class="nf">attribute_future</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">inputs</span><span class="p">:</span> <span class="n">TensorOrTupleOfTensorsGeneric</span><span class="p">,</span>
<span class="n">target</span><span class="p">:</span> <span class="n">TargetType</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">additional_forward_args</span><span class="p">:</span> <span class="n">Any</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">feature_mask</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="kc">None</span><span class="p">,</span> <span class="n">TensorOrTupleOfTensorsGeneric</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">perturbations_per_eval</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
<span class="n">show_progress</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
<span class="o">**</span><span class="n">kwargs</span><span class="p">:</span> <span class="n">Any</span><span class="p">,</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Future</span><span class="p">[</span><span class="n">TensorOrTupleOfTensorsGeneric</span><span class="p">]:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">kwargs</span><span class="p">,</span> <span class="nb">dict</span><span class="p">)</span> <span class="ow">and</span> <span class="s2">"baselines"</span> <span class="ow">in</span> <span class="n">kwargs</span><span class="p">:</span>
<span class="k">del</span> <span class="n">kwargs</span><span class="p">[</span><span class="s2">"baselines"</span><span class="p">]</span>
<span class="k">return</span> <span class="n">FeatureAblation</span><span class="o">.</span><span class="n">attribute</span><span class="o">.</span><span class="n">__wrapped__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">inputs</span><span class="p">,</span>
<span class="n">baselines</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">target</span><span class="o">=</span><span class="n">target</span><span class="p">,</span>
<span class="n">additional_forward_args</span><span class="o">=</span><span class="n">additional_forward_args</span><span class="p">,</span>
<span class="n">feature_mask</span><span class="o">=</span><span class="n">feature_mask</span><span class="p">,</span>
<span class="n">perturbations_per_eval</span><span class="o">=</span><span class="n">perturbations_per_eval</span><span class="p">,</span>
<span class="n">show_progress</span><span class="o">=</span><span class="n">show_progress</span><span class="p">,</span>
<span class="n">use_futures</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">use_futures</span><span class="p">,</span>
<span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
<span class="p">)</span>

<span class="k">def</span> <span class="nf">_construct_ablated_input</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">expanded_input</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">,</span>
Expand Down Expand Up @@ -355,7 +382,15 @@ <h1>Source code for captum.attr._core.feature_permutation</h1><div class="highli
<div aria-label="Main" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../../../index.html">Captum</a></h1>
<h3>Navigation</h3>
<search id="searchbox" role="search" style="display: none">
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" placeholder="Search" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../attribution.html">Attribution</a></li>
Expand Down Expand Up @@ -385,16 +420,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<search id="searchbox" role="search" style="display: none">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form action="../../../../search.html" class="search" method="get">
<input aria-labelledby="searchlabel" autocapitalize="off" autocomplete="off" autocorrect="off" name="q" spellcheck="false" type="text"/>
<input type="submit" value="Go"/>
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
Expand Down
Loading

0 comments on commit 7ea48bd

Please sign in to comment.