-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Circle CI
authored and
Circle CI
committed
Jun 21, 2024
1 parent
f952c0a
commit 83634fe
Showing
182 changed files
with
732,944 additions
and
732,863 deletions.
There are no files selected for viewing
Binary file modified
BIN
+0 Bytes
(100%)
master/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
master/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip
Binary file not shown.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-151 Bytes
(99%)
master/_images/sphx_glr_plot_compute_wasserstein_circle_002.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 modified
BIN
-206 Bytes
(99%)
master/_images/sphx_glr_plot_compute_wasserstein_circle_003.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 modified
BIN
+42 Bytes
(100%)
master/_images/sphx_glr_plot_compute_wasserstein_circle_004.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 modified
BIN
+63 Bytes
(100%)
master/_images/sphx_glr_plot_compute_wasserstein_circle_thumb.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.
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.
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.
Binary file modified
BIN
+448 Bytes
(100%)
master/_images/sphx_glr_plot_generalized_free_support_barycenter_002.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 modified
BIN
-1.25 KB
(99%)
master/_images/sphx_glr_plot_generalized_free_support_barycenter_003.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 modified
BIN
+204 Bytes
(100%)
master/_images/sphx_glr_plot_generalized_free_support_barycenter_thumb.png
Oops, something went wrong.
Binary file modified
BIN
+840 Bytes
(100%)
master/_images/sphx_glr_plot_sliced_wass_grad_flow_pytorch_004.png
Oops, something went wrong.
Binary file modified
BIN
-132 Bytes
(100%)
master/_images/sphx_glr_plot_sliced_wass_grad_flow_pytorch_thumb.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,12 +91,15 @@ <h1>Source code for ot.partial</h1><div class="highlight"><pre> | |
<span class="sd">"""</span> | ||
|
||
<span class="c1"># Author: Laetitia Chapel <[email protected]></span> | ||
<span class="c1"># License: MIT License</span> | ||
<span class="c1"># Yikun Bai < [email protected] ></span> | ||
<span class="c1"># Cédric Vincent-Cuaz <[email protected]></span> | ||
|
||
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> | ||
<span class="kn">from</span> <span class="nn">.lp</span> <span class="kn">import</span> <span class="n">emd</span> | ||
<span class="kn">from</span> <span class="nn">.backend</span> <span class="kn">import</span> <span class="n">get_backend</span> | ||
<span class="kn">from</span> <span class="nn">.utils</span> <span class="kn">import</span> <span class="n">list_to_array</span> | ||
<span class="kn">from</span> <span class="nn">.backend</span> <span class="kn">import</span> <span class="n">get_backend</span> | ||
<span class="kn">from</span> <span class="nn">.lp</span> <span class="kn">import</span> <span class="n">emd</span> | ||
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> | ||
|
||
<span class="c1"># License: MIT License</span> | ||
|
||
|
||
<div class="viewcode-block" id="partial_wasserstein_lagrange"> | ||
|
@@ -685,7 +688,7 @@ <h1>Source code for ot.partial</h1><div class="highlight"><pre> | |
<span class="s2">" equal than min(|a|_1, |b|_1)."</span><span class="p">)</span> | ||
|
||
<span class="k">if</span> <span class="n">G0</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> | ||
<span class="n">G0</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">q</span><span class="p">)</span> | ||
<span class="n">G0</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">q</span><span class="p">)</span> <span class="o">*</span> <span class="n">m</span> <span class="o">/</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">p</span><span class="p">)</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">q</span><span class="p">))</span> <span class="c1"># make sure |G0|=m, G01_m\leq p, G0.T1_n\leq q.</span> | ||
|
||
<span class="n">dim_G_extended</span> <span class="o">=</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">p</span><span class="p">)</span> <span class="o">+</span> <span class="n">nb_dummies</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">q</span><span class="p">)</span> <span class="o">+</span> <span class="n">nb_dummies</span><span class="p">)</span> | ||
<span class="n">q_extended</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">q</span><span class="p">,</span> <span class="p">[(</span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">p</span><span class="p">)</span> <span class="o">-</span> <span class="n">m</span><span class="p">)</span> <span class="o">/</span> <span class="n">nb_dummies</span><span class="p">]</span> <span class="o">*</span> <span class="n">nb_dummies</span><span class="p">)</span> | ||
|
@@ -701,7 +704,7 @@ <h1>Source code for ot.partial</h1><div class="highlight"><pre> | |
|
||
<span class="n">Gprev</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">copy</span><span class="p">(</span><span class="n">G0</span><span class="p">)</span> | ||
|
||
<span class="n">M</span> <span class="o">=</span> <span class="n">gwgrad_partial</span><span class="p">(</span><span class="n">C1</span><span class="p">,</span> <span class="n">C2</span><span class="p">,</span> <span class="n">G0</span><span class="p">)</span> | ||
<span class="n">M</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="o">*</span> <span class="n">gwgrad_partial</span><span class="p">(</span><span class="n">C1</span><span class="p">,</span> <span class="n">C2</span><span class="p">,</span> <span class="n">G0</span><span class="p">)</span> <span class="c1"># rescaling the gradient with 0.5 for line-search while not changing Gc</span> | ||
<span class="n">M_emd</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="n">dim_G_extended</span><span class="p">)</span> | ||
<span class="n">M_emd</span><span class="p">[:</span><span class="nb">len</span><span class="p">(</span><span class="n">p</span><span class="p">),</span> <span class="p">:</span><span class="nb">len</span><span class="p">(</span><span class="n">q</span><span class="p">)]</span> <span class="o">=</span> <span class="n">M</span> | ||
<span class="n">M_emd</span><span class="p">[</span><span class="o">-</span><span class="n">nb_dummies</span><span class="p">:,</span> <span class="o">-</span><span class="n">nb_dummies</span><span class="p">:]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">max</span><span class="p">(</span><span class="n">M</span><span class="p">)</span> <span class="o">*</span> <span class="mf">1e2</span> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.