Skip to content

Commit

Permalink
deploy: 19c7355
Browse files Browse the repository at this point in the history
  • Loading branch information
danielward27 committed Jun 21, 2024
0 parents commit 3736425
Show file tree
Hide file tree
Showing 142 changed files with 25,169 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 95ef1e4a16fe6e8d2dc4f51d2cad00a4
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/api/bijections.doctree
Binary file not shown.
Binary file added .doctrees/api/distributions.doctree
Binary file not shown.
Binary file added .doctrees/api/experimental.doctree
Binary file not shown.
Binary file added .doctrees/api/flows.doctree
Binary file not shown.
Binary file added .doctrees/api/losses.doctree
Binary file not shown.
Binary file added .doctrees/api/training.doctree
Binary file not shown.
Binary file added .doctrees/api/wrappers.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/examples/bounded.doctree
Binary file not shown.
Binary file added .doctrees/examples/conditional.doctree
Binary file not shown.
Binary file added .doctrees/examples/snpe.doctree
Binary file not shown.
Binary file added .doctrees/examples/unconditional.doctree
Binary file not shown.
Binary file added .doctrees/examples/variational_inference.doctree
Binary file not shown.
Binary file added .doctrees/faq.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
265 changes: 265 additions & 0 deletions .doctrees/nbsphinx/examples/bounded.ipynb

Large diffs are not rendered by default.

173 changes: 173 additions & 0 deletions .doctrees/nbsphinx/examples/conditional.ipynb

Large diffs are not rendered by default.

266 changes: 266 additions & 0 deletions .doctrees/nbsphinx/examples/snpe.ipynb

Large diffs are not rendered by default.

223 changes: 223 additions & 0 deletions .doctrees/nbsphinx/examples/unconditional.ipynb

Large diffs are not rendered by default.

253 changes: 253 additions & 0 deletions .doctrees/nbsphinx/examples/variational_inference.ipynb

Large diffs are not rendered by default.

Binary file added .doctrees/nbsphinx/examples_bounded_12_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .doctrees/nbsphinx/examples_bounded_6_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .doctrees/nbsphinx/examples_conditional_8_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .doctrees/nbsphinx/examples_snpe_12_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added .nojekyll
Empty file.
Binary file added _images/examples_bounded_12_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/examples_bounded_6_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/examples_conditional_8_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/examples_snpe_12_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/examples_unconditional_12_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/examples_variational_inference_7_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/examples_variational_inference_9_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
436 changes: 436 additions & 0 deletions _modules/flowjax/bijections/affine.html

Large diffs are not rendered by default.

340 changes: 340 additions & 0 deletions _modules/flowjax/bijections/bijection.html

Large diffs are not rendered by default.

389 changes: 389 additions & 0 deletions _modules/flowjax/bijections/block_autoregressive_network.html

Large diffs are not rendered by default.

226 changes: 226 additions & 0 deletions _modules/flowjax/bijections/chain.html

Large diffs are not rendered by default.

309 changes: 309 additions & 0 deletions _modules/flowjax/bijections/concatenate.html

Large diffs are not rendered by default.

259 changes: 259 additions & 0 deletions _modules/flowjax/bijections/coupling.html

Large diffs are not rendered by default.

172 changes: 172 additions & 0 deletions _modules/flowjax/bijections/exp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>flowjax.bijections.exp &mdash; FlowJax documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=3d3fbe02" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../../_static/style.css?v=60e24bd7" />


<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../../../_static/copybutton.js?v=ccdb6887"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="../../../index.html" class="icon icon-home">
FlowJax
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Examples</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/unconditional.html">Unconditional density estmation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/conditional.html">Conditional density estimation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/variational_inference.html">Variational inference</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/bounded.html">Bounded flows</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/snpe.html">Sequential neural posterior estimation</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">API</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../api/bijections.html">Bijections</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/distributions.html">Distributions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/experimental.html">Experimental</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/flows.html">Flows</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/losses.html">Loss functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/training.html">Training</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/wrappers.html">Wrappers</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Miscellaneous</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../faq.html">FAQ</a></li>
</ul>

</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">FlowJax</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../../index.html">Module code</a></li>
<li class="breadcrumb-item active">flowjax.bijections.exp</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for flowjax.bijections.exp</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;Exponential bijection.&quot;&quot;&quot;</span>

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">ClassVar</span>

<span class="kn">import</span> <span class="nn">jax.numpy</span> <span class="k">as</span> <span class="nn">jnp</span>

<span class="kn">from</span> <span class="nn">flowjax.bijections.bijection</span> <span class="kn">import</span> <span class="n">AbstractBijection</span>


<div class="viewcode-block" id="Exp">
<a class="viewcode-back" href="../../../api/bijections.html#flowjax.bijections.Exp">[docs]</a>
<span class="k">class</span> <span class="nc">Exp</span><span class="p">(</span><span class="n">AbstractBijection</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Elementwise exponential transform (forward) and log transform (inverse).</span>

<span class="sd"> Args:</span>
<span class="sd"> shape: Shape of the bijection. Defaults to ().</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="n">shape</span><span class="p">:</span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="o">...</span><span class="p">]</span> <span class="o">=</span> <span class="p">()</span>
<span class="n">cond_shape</span><span class="p">:</span> <span class="n">ClassVar</span><span class="p">[</span><span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>

<div class="viewcode-block" id="Exp.transform">
<a class="viewcode-back" href="../../../api/bijections.html#flowjax.bijections.Exp.transform">[docs]</a>
<span class="k">def</span> <span class="nf">transform</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">condition</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">return</span> <span class="n">jnp</span><span class="o">.</span><span class="n">exp</span><span class="p">(</span><span class="n">x</span><span class="p">)</span></div>


<div class="viewcode-block" id="Exp.transform_and_log_det">
<a class="viewcode-back" href="../../../api/bijections.html#flowjax.bijections.Exp.transform_and_log_det">[docs]</a>
<span class="k">def</span> <span class="nf">transform_and_log_det</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">condition</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">return</span> <span class="n">jnp</span><span class="o">.</span><span class="n">exp</span><span class="p">(</span><span class="n">x</span><span class="p">),</span> <span class="n">x</span><span class="o">.</span><span class="n">sum</span><span class="p">()</span></div>


<div class="viewcode-block" id="Exp.inverse">
<a class="viewcode-back" href="../../../api/bijections.html#flowjax.bijections.Exp.inverse">[docs]</a>
<span class="k">def</span> <span class="nf">inverse</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">condition</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">return</span> <span class="n">jnp</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">y</span><span class="p">)</span></div>


<div class="viewcode-block" id="Exp.inverse_and_log_det">
<a class="viewcode-back" href="../../../api/bijections.html#flowjax.bijections.Exp.inverse_and_log_det">[docs]</a>
<span class="k">def</span> <span class="nf">inverse_and_log_det</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">condition</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="n">x</span> <span class="o">=</span> <span class="n">jnp</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">y</span><span class="p">)</span>
<span class="k">return</span> <span class="n">x</span><span class="p">,</span> <span class="o">-</span><span class="n">x</span><span class="o">.</span><span class="n">sum</span><span class="p">()</span></div>
</div>

</pre></div>

</div>
</div>
<footer>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2022, Daniel Ward.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
Loading

0 comments on commit 3736425

Please sign in to comment.