mirror of
https://github.com/labmlai/annotated_deep_learning_paper_implementations.git
synced 2025-08-06 15:22:21 +08:00
readme
This commit is contained in:
116
docs/gan/cycle_gan/readme.html
Normal file
116
docs/gan/cycle_gan/readme.html
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<meta name="description" content=""/>
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:image:src" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
|
<meta name="twitter:title" content="Cycle GAN"/>
|
||||||
|
<meta name="twitter:description" content=""/>
|
||||||
|
<meta name="twitter:site" content="@labmlai"/>
|
||||||
|
<meta name="twitter:creator" content="@labmlai"/>
|
||||||
|
|
||||||
|
<meta property="og:url" content="https://nn.labml.ai/gan/cycle_gan/readme.html"/>
|
||||||
|
<meta property="og:title" content="Cycle GAN"/>
|
||||||
|
<meta property="og:image" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
|
<meta property="og:site_name" content="LabML Neural Networks"/>
|
||||||
|
<meta property="og:type" content="object"/>
|
||||||
|
<meta property="og:title" content="Cycle GAN"/>
|
||||||
|
<meta property="og:description" content=""/>
|
||||||
|
|
||||||
|
<title>Cycle GAN</title>
|
||||||
|
<link rel="shortcut icon" href="/icon.png"/>
|
||||||
|
<link rel="stylesheet" href="../../pylit.css">
|
||||||
|
<link rel="canonical" href="https://nn.labml.ai/gan/cycle_gan/readme.html"/>
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4V3HC8HBLH"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
|
||||||
|
function gtag() {
|
||||||
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'G-4V3HC8HBLH');
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='container'>
|
||||||
|
<div id="background"></div>
|
||||||
|
<div class='section'>
|
||||||
|
<div class='docs'>
|
||||||
|
<p>
|
||||||
|
<a class="parent" href="/">home</a>
|
||||||
|
<a class="parent" href="../index.html">gan</a>
|
||||||
|
<a class="parent" href="index.html">cycle_gan</a>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<a href="https://github.com/lab-ml/labml_nn/tree/master/labml_nn/gan/cycle_gan/readme.md">
|
||||||
|
<img alt="Github"
|
||||||
|
src="https://img.shields.io/github/stars/lab-ml/nn?style=social"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
<a href="https://join.slack.com/t/labforml/shared_invite/zt-egj9zvq9-Dl3hhZqobexgT7aVKnD14g/"
|
||||||
|
rel="nofollow">
|
||||||
|
<img alt="Join Slact"
|
||||||
|
src="https://img.shields.io/badge/slack-chat-green.svg?logo=slack"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
<a href="https://twitter.com/labmlai"
|
||||||
|
rel="nofollow">
|
||||||
|
<img alt="Twitter"
|
||||||
|
src="https://img.shields.io/twitter/follow/labmlai?style=social"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='section' id='section-0'>
|
||||||
|
<div class='docs'>
|
||||||
|
<div class='section-link'>
|
||||||
|
<a href='#section-0'>#</a>
|
||||||
|
</div>
|
||||||
|
<h1><a href="https://nn.labml.ai/gan/cycle_gan/index.html">Cycle GAN</a></h1>
|
||||||
|
<p>This is a <a href="https://pytorch.org">PyTorch</a> implementation/tutorial of the paper
|
||||||
|
<a href="https://arxiv.org/abs/1703.10593">Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks</a>.</p>
|
||||||
|
</div>
|
||||||
|
<div class='code'>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML">
|
||||||
|
</script>
|
||||||
|
<!-- MathJax configuration -->
|
||||||
|
<script type="text/x-mathjax-config">
|
||||||
|
MathJax.Hub.Config({
|
||||||
|
tex2jax: {
|
||||||
|
inlineMath: [ ['$','$'] ],
|
||||||
|
displayMath: [ ['$$','$$'] ],
|
||||||
|
processEscapes: true,
|
||||||
|
processEnvironments: true
|
||||||
|
},
|
||||||
|
// Center justify equations in code and markdown cells. Elsewhere
|
||||||
|
// we use CSS to left justify single line equations in code cells.
|
||||||
|
displayAlign: 'center',
|
||||||
|
"HTML-CSS": { fonts: ["TeX"] }
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
116
docs/gan/dcgan/readme.html
Normal file
116
docs/gan/dcgan/readme.html
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<meta name="description" content=""/>
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:image:src" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
|
<meta name="twitter:title" content="Deep Convolutional Generative Adversarial Networks - DCGAN"/>
|
||||||
|
<meta name="twitter:description" content=""/>
|
||||||
|
<meta name="twitter:site" content="@labmlai"/>
|
||||||
|
<meta name="twitter:creator" content="@labmlai"/>
|
||||||
|
|
||||||
|
<meta property="og:url" content="https://nn.labml.ai/gan/dcgan/readme.html"/>
|
||||||
|
<meta property="og:title" content="Deep Convolutional Generative Adversarial Networks - DCGAN"/>
|
||||||
|
<meta property="og:image" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
|
<meta property="og:site_name" content="LabML Neural Networks"/>
|
||||||
|
<meta property="og:type" content="object"/>
|
||||||
|
<meta property="og:title" content="Deep Convolutional Generative Adversarial Networks - DCGAN"/>
|
||||||
|
<meta property="og:description" content=""/>
|
||||||
|
|
||||||
|
<title>Deep Convolutional Generative Adversarial Networks - DCGAN</title>
|
||||||
|
<link rel="shortcut icon" href="/icon.png"/>
|
||||||
|
<link rel="stylesheet" href="../../pylit.css">
|
||||||
|
<link rel="canonical" href="https://nn.labml.ai/gan/dcgan/readme.html"/>
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4V3HC8HBLH"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
|
||||||
|
function gtag() {
|
||||||
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'G-4V3HC8HBLH');
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='container'>
|
||||||
|
<div id="background"></div>
|
||||||
|
<div class='section'>
|
||||||
|
<div class='docs'>
|
||||||
|
<p>
|
||||||
|
<a class="parent" href="/">home</a>
|
||||||
|
<a class="parent" href="../index.html">gan</a>
|
||||||
|
<a class="parent" href="index.html">dcgan</a>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<a href="https://github.com/lab-ml/labml_nn/tree/master/labml_nn/gan/dcgan/readme.md">
|
||||||
|
<img alt="Github"
|
||||||
|
src="https://img.shields.io/github/stars/lab-ml/nn?style=social"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
<a href="https://join.slack.com/t/labforml/shared_invite/zt-egj9zvq9-Dl3hhZqobexgT7aVKnD14g/"
|
||||||
|
rel="nofollow">
|
||||||
|
<img alt="Join Slact"
|
||||||
|
src="https://img.shields.io/badge/slack-chat-green.svg?logo=slack"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
<a href="https://twitter.com/labmlai"
|
||||||
|
rel="nofollow">
|
||||||
|
<img alt="Twitter"
|
||||||
|
src="https://img.shields.io/twitter/follow/labmlai?style=social"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='section' id='section-0'>
|
||||||
|
<div class='docs'>
|
||||||
|
<div class='section-link'>
|
||||||
|
<a href='#section-0'>#</a>
|
||||||
|
</div>
|
||||||
|
<h1><a href="https://nn.labml.ai/gan/dcgan/index.html">Deep Convolutional Generative Adversarial Networks - DCGAN</a></h1>
|
||||||
|
<p>This is a <a href="https://pytorch.org">PyTorch</a> implementation of paper
|
||||||
|
<a href="https://arxiv.org/abs/1511.06434">Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks</a>.</p>
|
||||||
|
</div>
|
||||||
|
<div class='code'>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML">
|
||||||
|
</script>
|
||||||
|
<!-- MathJax configuration -->
|
||||||
|
<script type="text/x-mathjax-config">
|
||||||
|
MathJax.Hub.Config({
|
||||||
|
tex2jax: {
|
||||||
|
inlineMath: [ ['$','$'] ],
|
||||||
|
displayMath: [ ['$$','$$'] ],
|
||||||
|
processEscapes: true,
|
||||||
|
processEnvironments: true
|
||||||
|
},
|
||||||
|
// Center justify equations in code and markdown cells. Elsewhere
|
||||||
|
// we use CSS to left justify single line equations in code cells.
|
||||||
|
displayAlign: 'center',
|
||||||
|
"HTML-CSS": { fonts: ["TeX"] }
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -3,24 +3,24 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<meta name="description" content=""/>
|
<meta name="description" content="A set of PyTorch implementations/tutorials of GANs."/>
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary"/>
|
<meta name="twitter:card" content="summary"/>
|
||||||
<meta name="twitter:image:src" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
<meta name="twitter:image:src" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
<meta name="twitter:title" content="None"/>
|
<meta name="twitter:title" content="Generative Adversarial Networks"/>
|
||||||
<meta name="twitter:description" content=""/>
|
<meta name="twitter:description" content="A set of PyTorch implementations/tutorials of GANs."/>
|
||||||
<meta name="twitter:site" content="@labmlai"/>
|
<meta name="twitter:site" content="@labmlai"/>
|
||||||
<meta name="twitter:creator" content="@labmlai"/>
|
<meta name="twitter:creator" content="@labmlai"/>
|
||||||
|
|
||||||
<meta property="og:url" content="https://nn.labml.ai/gan/index.html"/>
|
<meta property="og:url" content="https://nn.labml.ai/gan/index.html"/>
|
||||||
<meta property="og:title" content="None"/>
|
<meta property="og:title" content="Generative Adversarial Networks"/>
|
||||||
<meta property="og:image" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
<meta property="og:image" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
<meta property="og:site_name" content="LabML Neural Networks"/>
|
<meta property="og:site_name" content="LabML Neural Networks"/>
|
||||||
<meta property="og:type" content="object"/>
|
<meta property="og:type" content="object"/>
|
||||||
<meta property="og:title" content="None"/>
|
<meta property="og:title" content="Generative Adversarial Networks"/>
|
||||||
<meta property="og:description" content=""/>
|
<meta property="og:description" content="A set of PyTorch implementations/tutorials of GANs."/>
|
||||||
|
|
||||||
<title>None</title>
|
<title>Generative Adversarial Networks</title>
|
||||||
<link rel="shortcut icon" href="/icon.png"/>
|
<link rel="shortcut icon" href="/icon.png"/>
|
||||||
<link rel="stylesheet" href="../pylit.css">
|
<link rel="stylesheet" href="../pylit.css">
|
||||||
<link rel="canonical" href="https://nn.labml.ai/gan/index.html"/>
|
<link rel="canonical" href="https://nn.labml.ai/gan/index.html"/>
|
||||||
@ -66,6 +66,23 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class='section' id='section-0'>
|
||||||
|
<div class='docs doc-strings'>
|
||||||
|
<div class='section-link'>
|
||||||
|
<a href='#section-0'>#</a>
|
||||||
|
</div>
|
||||||
|
<h1>Generative Adversarial Networks</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a href="original/index.html">Original GAN</a></li>
|
||||||
|
<li><a href="dcgan/index.html">GAN with deep convolutional network</a></li>
|
||||||
|
<li><a href="cycle_gan/index.html">Cycle GAN</a></li>
|
||||||
|
<li><a href="wasserstein/index.html">Wasserstein GAN</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class='code'>
|
||||||
|
<div class="highlight"><pre></pre></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML">
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML">
|
||||||
|
116
docs/gan/original/readme.html
Normal file
116
docs/gan/original/readme.html
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<meta name="description" content=""/>
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:image:src" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
|
<meta name="twitter:title" content="Generative Adversarial Networks - GAN"/>
|
||||||
|
<meta name="twitter:description" content=""/>
|
||||||
|
<meta name="twitter:site" content="@labmlai"/>
|
||||||
|
<meta name="twitter:creator" content="@labmlai"/>
|
||||||
|
|
||||||
|
<meta property="og:url" content="https://nn.labml.ai/gan/original/readme.html"/>
|
||||||
|
<meta property="og:title" content="Generative Adversarial Networks - GAN"/>
|
||||||
|
<meta property="og:image" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
|
<meta property="og:site_name" content="LabML Neural Networks"/>
|
||||||
|
<meta property="og:type" content="object"/>
|
||||||
|
<meta property="og:title" content="Generative Adversarial Networks - GAN"/>
|
||||||
|
<meta property="og:description" content=""/>
|
||||||
|
|
||||||
|
<title>Generative Adversarial Networks - GAN</title>
|
||||||
|
<link rel="shortcut icon" href="/icon.png"/>
|
||||||
|
<link rel="stylesheet" href="../../pylit.css">
|
||||||
|
<link rel="canonical" href="https://nn.labml.ai/gan/original/readme.html"/>
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4V3HC8HBLH"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
|
||||||
|
function gtag() {
|
||||||
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'G-4V3HC8HBLH');
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='container'>
|
||||||
|
<div id="background"></div>
|
||||||
|
<div class='section'>
|
||||||
|
<div class='docs'>
|
||||||
|
<p>
|
||||||
|
<a class="parent" href="/">home</a>
|
||||||
|
<a class="parent" href="../index.html">gan</a>
|
||||||
|
<a class="parent" href="index.html">original</a>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<a href="https://github.com/lab-ml/labml_nn/tree/master/labml_nn/gan/original/readme.md">
|
||||||
|
<img alt="Github"
|
||||||
|
src="https://img.shields.io/github/stars/lab-ml/nn?style=social"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
<a href="https://join.slack.com/t/labforml/shared_invite/zt-egj9zvq9-Dl3hhZqobexgT7aVKnD14g/"
|
||||||
|
rel="nofollow">
|
||||||
|
<img alt="Join Slact"
|
||||||
|
src="https://img.shields.io/badge/slack-chat-green.svg?logo=slack"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
<a href="https://twitter.com/labmlai"
|
||||||
|
rel="nofollow">
|
||||||
|
<img alt="Twitter"
|
||||||
|
src="https://img.shields.io/twitter/follow/labmlai?style=social"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='section' id='section-0'>
|
||||||
|
<div class='docs'>
|
||||||
|
<div class='section-link'>
|
||||||
|
<a href='#section-0'>#</a>
|
||||||
|
</div>
|
||||||
|
<h1><a href="https://nn.labml.ai/gan/original/index.html">Generative Adversarial Networks - GAN</a></h1>
|
||||||
|
<p>This is an annotated implementation of
|
||||||
|
<a href="https://arxiv.org/abs/1406.2661">Generative Adversarial Networks</a>.</p>
|
||||||
|
</div>
|
||||||
|
<div class='code'>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML">
|
||||||
|
</script>
|
||||||
|
<!-- MathJax configuration -->
|
||||||
|
<script type="text/x-mathjax-config">
|
||||||
|
MathJax.Hub.Config({
|
||||||
|
tex2jax: {
|
||||||
|
inlineMath: [ ['$','$'] ],
|
||||||
|
displayMath: [ ['$$','$$'] ],
|
||||||
|
processEscapes: true,
|
||||||
|
processEnvironments: true
|
||||||
|
},
|
||||||
|
// Center justify equations in code and markdown cells. Elsewhere
|
||||||
|
// we use CSS to left justify single line equations in code cells.
|
||||||
|
displayAlign: 'center',
|
||||||
|
"HTML-CSS": { fonts: ["TeX"] }
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -72,7 +72,8 @@
|
|||||||
<div class='section-link'>
|
<div class='section-link'>
|
||||||
<a href='#section-0'>#</a>
|
<a href='#section-0'>#</a>
|
||||||
</div>
|
</div>
|
||||||
<p>This is an implementation of
|
<h1>Wasserstein GAN (WGAN)</h1>
|
||||||
|
<p>This is an implementation of
|
||||||
<a href="https://arxiv.org/abs/1701.07875">Wasserstein GAN</a>.</p>
|
<a href="https://arxiv.org/abs/1701.07875">Wasserstein GAN</a>.</p>
|
||||||
<p>The original GAN loss is based on Jensen-Shannon (JS) divergence
|
<p>The original GAN loss is based on Jensen-Shannon (JS) divergence
|
||||||
between the real distribution $\mathbb{P}_r$ and generated distribution $\mathbb{P}_g$.
|
between the real distribution $\mathbb{P}_r$ and generated distribution $\mathbb{P}_g$.
|
||||||
@ -140,10 +141,10 @@ network that defines $f$ clipped within a range.</em></p>
|
|||||||
<p><a href="https://colab.research.google.com/github/lab-ml/nn/blob/master/labml_nn/gan/wasserstein/experiment.ipynb"><img alt="Open In Colab" src="https://colab.research.google.com/assets/colab-badge.svg" /></a></p>
|
<p><a href="https://colab.research.google.com/github/lab-ml/nn/blob/master/labml_nn/gan/wasserstein/experiment.ipynb"><img alt="Open In Colab" src="https://colab.research.google.com/assets/colab-badge.svg" /></a></p>
|
||||||
</div>
|
</div>
|
||||||
<div class='code'>
|
<div class='code'>
|
||||||
<div class="highlight"><pre><span class="lineno">85</span><span></span><span class="kn">import</span> <span class="nn">torch.utils.data</span>
|
<div class="highlight"><pre><span class="lineno">87</span><span></span><span class="kn">import</span> <span class="nn">torch.utils.data</span>
|
||||||
<span class="lineno">86</span><span class="kn">from</span> <span class="nn">torch.nn</span> <span class="kn">import</span> <span class="n">functional</span> <span class="k">as</span> <span class="n">F</span>
|
<span class="lineno">88</span><span class="kn">from</span> <span class="nn">torch.nn</span> <span class="kn">import</span> <span class="n">functional</span> <span class="k">as</span> <span class="n">F</span>
|
||||||
<span class="lineno">87</span>
|
<span class="lineno">89</span>
|
||||||
<span class="lineno">88</span><span class="kn">from</span> <span class="nn">labml_helpers.module</span> <span class="kn">import</span> <span class="n">Module</span></pre></div>
|
<span class="lineno">90</span><span class="kn">from</span> <span class="nn">labml_helpers.module</span> <span class="kn">import</span> <span class="n">Module</span></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='section' id='section-1'>
|
<div class='section' id='section-1'>
|
||||||
@ -160,7 +161,7 @@ so we minimize,
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class='code'>
|
<div class='code'>
|
||||||
<div class="highlight"><pre><span class="lineno">91</span><span class="k">class</span> <span class="nc">DiscriminatorLoss</span><span class="p">(</span><span class="n">Module</span><span class="p">):</span></pre></div>
|
<div class="highlight"><pre><span class="lineno">93</span><span class="k">class</span> <span class="nc">DiscriminatorLoss</span><span class="p">(</span><span class="n">Module</span><span class="p">):</span></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='section' id='section-2'>
|
<div class='section' id='section-2'>
|
||||||
@ -174,7 +175,7 @@ so we minimize,
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class='code'>
|
<div class='code'>
|
||||||
<div class="highlight"><pre><span class="lineno">102</span> <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">f_real</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">,</span> <span class="n">f_fake</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">):</span></pre></div>
|
<div class="highlight"><pre><span class="lineno">104</span> <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">f_real</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">,</span> <span class="n">f_fake</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">):</span></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='section' id='section-3'>
|
<div class='section' id='section-3'>
|
||||||
@ -185,7 +186,7 @@ so we minimize,
|
|||||||
<p>We use ReLUs to clip the loss to keep $f \in [-1, +1]$ range.</p>
|
<p>We use ReLUs to clip the loss to keep $f \in [-1, +1]$ range.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class='code'>
|
<div class='code'>
|
||||||
<div class="highlight"><pre><span class="lineno">109</span> <span class="k">return</span> <span class="n">F</span><span class="o">.</span><span class="n">relu</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">f_real</span><span class="p">)</span><span class="o">.</span><span class="n">mean</span><span class="p">(),</span> <span class="n">F</span><span class="o">.</span><span class="n">relu</span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">f_fake</span><span class="p">)</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span></pre></div>
|
<div class="highlight"><pre><span class="lineno">111</span> <span class="k">return</span> <span class="n">F</span><span class="o">.</span><span class="n">relu</span><span class="p">(</span><span class="mi">1</span> <span class="o">-</span> <span class="n">f_real</span><span class="p">)</span><span class="o">.</span><span class="n">mean</span><span class="p">(),</span> <span class="n">F</span><span class="o">.</span><span class="n">relu</span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">f_fake</span><span class="p">)</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='section' id='section-4'>
|
<div class='section' id='section-4'>
|
||||||
@ -202,7 +203,7 @@ so we minimize,
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class='code'>
|
<div class='code'>
|
||||||
<div class="highlight"><pre><span class="lineno">112</span><span class="k">class</span> <span class="nc">GeneratorLoss</span><span class="p">(</span><span class="n">Module</span><span class="p">):</span></pre></div>
|
<div class="highlight"><pre><span class="lineno">114</span><span class="k">class</span> <span class="nc">GeneratorLoss</span><span class="p">(</span><span class="n">Module</span><span class="p">):</span></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='section' id='section-5'>
|
<div class='section' id='section-5'>
|
||||||
@ -215,7 +216,7 @@ so we minimize,
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class='code'>
|
<div class='code'>
|
||||||
<div class="highlight"><pre><span class="lineno">124</span> <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">f_fake</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">):</span></pre></div>
|
<div class="highlight"><pre><span class="lineno">126</span> <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">f_fake</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">):</span></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='section' id='section-6'>
|
<div class='section' id='section-6'>
|
||||||
@ -226,7 +227,7 @@ so we minimize,
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class='code'>
|
<div class='code'>
|
||||||
<div class="highlight"><pre><span class="lineno">128</span> <span class="k">return</span> <span class="o">-</span><span class="n">f_fake</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span></pre></div>
|
<div class="highlight"><pre><span class="lineno">130</span> <span class="k">return</span> <span class="o">-</span><span class="n">f_fake</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
116
docs/gan/wasserstein/readme.html
Normal file
116
docs/gan/wasserstein/readme.html
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<meta name="description" content=""/>
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary"/>
|
||||||
|
<meta name="twitter:image:src" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
|
<meta name="twitter:title" content="Wasserstein GAN - WGAN"/>
|
||||||
|
<meta name="twitter:description" content=""/>
|
||||||
|
<meta name="twitter:site" content="@labmlai"/>
|
||||||
|
<meta name="twitter:creator" content="@labmlai"/>
|
||||||
|
|
||||||
|
<meta property="og:url" content="https://nn.labml.ai/gan/wasserstein/readme.html"/>
|
||||||
|
<meta property="og:title" content="Wasserstein GAN - WGAN"/>
|
||||||
|
<meta property="og:image" content="https://avatars1.githubusercontent.com/u/64068543?s=400&v=4"/>
|
||||||
|
<meta property="og:site_name" content="LabML Neural Networks"/>
|
||||||
|
<meta property="og:type" content="object"/>
|
||||||
|
<meta property="og:title" content="Wasserstein GAN - WGAN"/>
|
||||||
|
<meta property="og:description" content=""/>
|
||||||
|
|
||||||
|
<title>Wasserstein GAN - WGAN</title>
|
||||||
|
<link rel="shortcut icon" href="/icon.png"/>
|
||||||
|
<link rel="stylesheet" href="../../pylit.css">
|
||||||
|
<link rel="canonical" href="https://nn.labml.ai/gan/wasserstein/readme.html"/>
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4V3HC8HBLH"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
|
||||||
|
function gtag() {
|
||||||
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'G-4V3HC8HBLH');
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='container'>
|
||||||
|
<div id="background"></div>
|
||||||
|
<div class='section'>
|
||||||
|
<div class='docs'>
|
||||||
|
<p>
|
||||||
|
<a class="parent" href="/">home</a>
|
||||||
|
<a class="parent" href="../index.html">gan</a>
|
||||||
|
<a class="parent" href="index.html">wasserstein</a>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<a href="https://github.com/lab-ml/labml_nn/tree/master/labml_nn/gan/wasserstein/readme.md">
|
||||||
|
<img alt="Github"
|
||||||
|
src="https://img.shields.io/github/stars/lab-ml/nn?style=social"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
<a href="https://join.slack.com/t/labforml/shared_invite/zt-egj9zvq9-Dl3hhZqobexgT7aVKnD14g/"
|
||||||
|
rel="nofollow">
|
||||||
|
<img alt="Join Slact"
|
||||||
|
src="https://img.shields.io/badge/slack-chat-green.svg?logo=slack"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
<a href="https://twitter.com/labmlai"
|
||||||
|
rel="nofollow">
|
||||||
|
<img alt="Twitter"
|
||||||
|
src="https://img.shields.io/twitter/follow/labmlai?style=social"
|
||||||
|
style="max-width:100%;"/></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='section' id='section-0'>
|
||||||
|
<div class='docs'>
|
||||||
|
<div class='section-link'>
|
||||||
|
<a href='#section-0'>#</a>
|
||||||
|
</div>
|
||||||
|
<h1><a href="https://nn.labml.ai/gan/wasserstein/index.html">Wasserstein GAN - WGAN</a></h1>
|
||||||
|
<p>This is an implementation of
|
||||||
|
<a href="https://arxiv.org/abs/1701.07875">Wasserstein GAN</a>.</p>
|
||||||
|
</div>
|
||||||
|
<div class='code'>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML">
|
||||||
|
</script>
|
||||||
|
<!-- MathJax configuration -->
|
||||||
|
<script type="text/x-mathjax-config">
|
||||||
|
MathJax.Hub.Config({
|
||||||
|
tex2jax: {
|
||||||
|
inlineMath: [ ['$','$'] ],
|
||||||
|
displayMath: [ ['$$','$$'] ],
|
||||||
|
processEscapes: true,
|
||||||
|
processEnvironments: true
|
||||||
|
},
|
||||||
|
// Center justify equations in code and markdown cells. Elsewhere
|
||||||
|
// we use CSS to left justify single line equations in code cells.
|
||||||
|
displayAlign: 'center',
|
||||||
|
"HTML-CSS": { fonts: ["TeX"] }
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -102,9 +102,10 @@ implementations.</p>
|
|||||||
<h4>✨ <a href="capsule_networks/index.html">Capsule Networks</a></h4>
|
<h4>✨ <a href="capsule_networks/index.html">Capsule Networks</a></h4>
|
||||||
<h4>✨ <a href="gan/index.html">Generative Adversarial Networks</a></h4>
|
<h4>✨ <a href="gan/index.html">Generative Adversarial Networks</a></h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="gan/simple_mnist_experiment.html">GAN with a multi-layer perceptron</a></li>
|
<li><a href="gan/original/index.html">Original GAN</a></li>
|
||||||
<li><a href="gan/dcgan.html">GAN with deep convolutional network</a></li>
|
<li><a href="gan/dcgan/index.html">GAN with deep convolutional network</a></li>
|
||||||
<li><a href="gan/cycle_gan.html">Cycle GAN</a></li>
|
<li><a href="gan/cycle_gan/index.html">Cycle GAN</a></li>
|
||||||
|
<li><a href="gan/wasserstein/index.html">Wasserstein GAN</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4>✨ <a href="sketch_rnn/index.html">Sketch RNN</a></h4>
|
<h4>✨ <a href="sketch_rnn/index.html">Sketch RNN</a></h4>
|
||||||
<h4>✨ <a href="rl/index.html">Reinforcement Learning</a></h4>
|
<h4>✨ <a href="rl/index.html">Reinforcement Learning</a></h4>
|
||||||
|
@ -15,14 +15,14 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://nn.labml.ai/gan/wasserstein/index.html</loc>
|
<loc>https://nn.labml.ai/gan/wasserstein/index.html</loc>
|
||||||
<lastmod>2021-05-05T16:30:00+00:00</lastmod>
|
<lastmod>2021-05-07T16:30:00+00:00</lastmod>
|
||||||
<priority>1.00</priority>
|
<priority>1.00</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://nn.labml.ai/gan/wasserstein/experiment.html</loc>
|
<loc>https://nn.labml.ai/gan/wasserstein/experiment.html</loc>
|
||||||
<lastmod>2021-05-06T16:30:00+00:00</lastmod>
|
<lastmod>2021-05-07T16:30:00+00:00</lastmod>
|
||||||
<priority>1.00</priority>
|
<priority>1.00</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
@ -36,9 +36,10 @@ implementations.
|
|||||||
#### ✨ [Capsule Networks](capsule_networks/index.html)
|
#### ✨ [Capsule Networks](capsule_networks/index.html)
|
||||||
|
|
||||||
#### ✨ [Generative Adversarial Networks](gan/index.html)
|
#### ✨ [Generative Adversarial Networks](gan/index.html)
|
||||||
* [GAN with a multi-layer perceptron](gan/simple_mnist_experiment.html)
|
* [Original GAN](gan/original/index.html)
|
||||||
* [GAN with deep convolutional network](gan/dcgan.html)
|
* [GAN with deep convolutional network](gan/dcgan/index.html)
|
||||||
* [Cycle GAN](gan/cycle_gan.html)
|
* [Cycle GAN](gan/cycle_gan/index.html)
|
||||||
|
* [Wasserstein GAN](gan/wasserstein/index.html)
|
||||||
|
|
||||||
#### ✨ [Sketch RNN](sketch_rnn/index.html)
|
#### ✨ [Sketch RNN](sketch_rnn/index.html)
|
||||||
|
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
"""
|
||||||
|
---
|
||||||
|
title: Generative Adversarial Networks
|
||||||
|
summary: >
|
||||||
|
A set of PyTorch implementations/tutorials of GANs.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Generative Adversarial Networks
|
||||||
|
|
||||||
|
* [Original GAN](original/index.html)
|
||||||
|
* [GAN with deep convolutional network](dcgan/index.html)
|
||||||
|
* [Cycle GAN](cycle_gan/index.html)
|
||||||
|
* [Wasserstein GAN](wasserstein/index.html)
|
||||||
|
"""
|
4
labml_nn/gan/cycle_gan/readme.md
Normal file
4
labml_nn/gan/cycle_gan/readme.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# [Cycle GAN](https://nn.labml.ai/gan/cycle_gan/index.html)
|
||||||
|
|
||||||
|
This is a [PyTorch](https://pytorch.org) implementation/tutorial of the paper
|
||||||
|
[Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks](https://arxiv.org/abs/1703.10593).
|
4
labml_nn/gan/dcgan/readme.md
Normal file
4
labml_nn/gan/dcgan/readme.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# [Deep Convolutional Generative Adversarial Networks - DCGAN](https://nn.labml.ai/gan/dcgan/index.html)
|
||||||
|
|
||||||
|
This is a [PyTorch](https://pytorch.org) implementation of paper
|
||||||
|
[Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks](https://arxiv.org/abs/1511.06434).
|
4
labml_nn/gan/original/readme.md
Normal file
4
labml_nn/gan/original/readme.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# [Generative Adversarial Networks - GAN](https://nn.labml.ai/gan/original/index.html)
|
||||||
|
|
||||||
|
This is an annotated implementation of
|
||||||
|
[Generative Adversarial Networks](https://arxiv.org/abs/1406.2661).
|
@ -4,6 +4,8 @@ title: Wasserstein GAN (WGAN)
|
|||||||
summary: A simple PyTorch implementation/tutorial of Wasserstein Generative Adversarial Networks (WGAN) loss functions.
|
summary: A simple PyTorch implementation/tutorial of Wasserstein Generative Adversarial Networks (WGAN) loss functions.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Wasserstein GAN (WGAN)
|
||||||
|
|
||||||
This is an implementation of
|
This is an implementation of
|
||||||
[Wasserstein GAN](https://arxiv.org/abs/1701.07875).
|
[Wasserstein GAN](https://arxiv.org/abs/1701.07875).
|
||||||
|
|
||||||
|
4
labml_nn/gan/wasserstein/readme.md
Normal file
4
labml_nn/gan/wasserstein/readme.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# [Wasserstein GAN - WGAN](https://nn.labml.ai/gan/wasserstein/index.html)
|
||||||
|
|
||||||
|
This is an implementation of
|
||||||
|
[Wasserstein GAN](https://arxiv.org/abs/1701.07875).
|
@ -42,9 +42,10 @@ implementations almost weekly.
|
|||||||
#### ✨ [Capsule Networks](https://nn.labml.ai/capsule_networks/index.html)
|
#### ✨ [Capsule Networks](https://nn.labml.ai/capsule_networks/index.html)
|
||||||
|
|
||||||
#### ✨ [Generative Adversarial Networks](https://nn.labml.ai/gan/index.html)
|
#### ✨ [Generative Adversarial Networks](https://nn.labml.ai/gan/index.html)
|
||||||
* [GAN with a multi-layer perceptron](https://nn.labml.ai/gan/simple_mnist_experiment.html)
|
* [Original GAN](https://nn.labml.ai/gan/original/index.html)
|
||||||
* [GAN with deep convolutional network](https://nn.labml.ai/gan/dcgan.html)
|
* [GAN with deep convolutional network](https://nn.labml.ai/gan/dcgan/index.html)
|
||||||
* [Cycle GAN](https://nn.labml.ai/gan/cycle_gan.html)
|
* [Cycle GAN](https://nn.labml.ai/gan/cycle_gan/index.html)
|
||||||
|
* [Wasserstein GAN](https://nn.labml.ai/gan/wasserstein/index.html)
|
||||||
|
|
||||||
#### ✨ [Sketch RNN](https://nn.labml.ai/sketch_rnn/index.html)
|
#### ✨ [Sketch RNN](https://nn.labml.ai/sketch_rnn/index.html)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user