Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
9c6eb092
Commit
9c6eb092
authored
Dec 19, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update gan notes
parent
34da9a1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
README.md
README.md
+1
-1
examples/GAN/GAN.py
examples/GAN/GAN.py
+5
-0
examples/GAN/README.md
examples/GAN/README.md
+7
-3
examples/GAN/demo/im2im-cityscapes.jpg
examples/GAN/demo/im2im-cityscapes.jpg
+0
-0
No files found.
README.md
View file @
9c6eb092
...
@@ -60,7 +60,7 @@ The components are designed to be independent. You can use Model or DataFlow in
...
@@ -60,7 +60,7 @@ The components are designed to be independent. You can use Model or DataFlow in
pip install --user -r requirements.txt
pip install --user -r requirements.txt
pip install --user -r opt-requirements.txt (some optional dependencies, you can install later if needed)
pip install --user -r opt-requirements.txt (some optional dependencies, you can install later if needed)
```
```
+
Enable
`import tensorpack`
:
+
Enable
`import tensorpack`
(or use
`greadlink`
from
`coreutils`
brew package if you're on OSX)
:
```
```
export PYTHONPATH=$PYTHONPATH:`readlink -f path/to/tensorpack`
export PYTHONPATH=$PYTHONPATH:`readlink -f path/to/tensorpack`
```
```
...
...
examples/GAN/GAN.py
View file @
9c6eb092
...
@@ -42,6 +42,11 @@ class RandomZData(DataFlow):
...
@@ -42,6 +42,11 @@ class RandomZData(DataFlow):
yield
[
np
.
random
.
uniform
(
-
1
,
1
,
size
=
self
.
shape
)]
yield
[
np
.
random
.
uniform
(
-
1
,
1
,
size
=
self
.
shape
)]
def
build_GAN_losses
(
vecpos
,
vecneg
):
def
build_GAN_losses
(
vecpos
,
vecneg
):
"""
:param vecpos, vecneg: output of the discriminator (logits) for real
and fake images.
:return: (loss of G, loss of D)
"""
sigmpos
=
tf
.
sigmoid
(
vecpos
)
sigmpos
=
tf
.
sigmoid
(
vecpos
)
sigmneg
=
tf
.
sigmoid
(
vecneg
)
sigmneg
=
tf
.
sigmoid
(
vecneg
)
tf
.
summary
.
histogram
(
'sigmoid-pos'
,
sigmpos
)
tf
.
summary
.
histogram
(
'sigmoid-pos'
,
sigmpos
)
...
...
examples/GAN/README.md
View file @
9c6eb092
...
@@ -8,7 +8,7 @@ Reproduce the following GAN-related papers:
...
@@ -8,7 +8,7 @@ Reproduce the following GAN-related papers:
+
InfoGAN: Interpretable Representation Learning by Information Maximizing GAN.
[
paper
](
https://arxiv.org/abs/1606.03657
)
+
InfoGAN: Interpretable Representation Learning by Information Maximizing GAN.
[
paper
](
https://arxiv.org/abs/1606.03657
)
See the docstring in each script for detailed usage
.
Detailed usage is in the docstring of each script
.
## DCGAN-CelebA.py
## DCGAN-CelebA.py
...
@@ -26,12 +26,16 @@ Play with the [pretrained model](https://drive.google.com/drive/folders/0B9IPQTv
...
@@ -26,12 +26,16 @@ Play with the [pretrained model](https://drive.google.com/drive/folders/0B9IPQTv
## Image2Image.py
## Image2Image.py
Reproduce
Image-to-Image following the setup in
[
pix2pix
](
https://github.com/phillipi/pix2pix
)
.
Image-to-Image following the setup in
[
pix2pix
](
https://github.com/phillipi/pix2pix
)
.
It requires the datasets released by the original authors.
It requires the datasets released by the original authors.
With the cityscapes dataset, it learns to generate semantic segmentation map of urban scene:

## InfoGAN-mnist.py
## InfoGAN-mnist.py
Reproduce
a
mnist experiement in InfoGAN.
Reproduce
one
mnist experiement in InfoGAN.
By assuming 10 latent variables corresponding to a categorical distribution and maximizing mutual information,
By assuming 10 latent variables corresponding to a categorical distribution and maximizing mutual information,
the network learns to map the 10 variables to 10 digits in a completely unsupervised way.
the network learns to map the 10 variables to 10 digits in a completely unsupervised way.
...
...
examples/GAN/demo/im2im-cityscapes.jpg
0 → 100644
View file @
9c6eb092
22.4 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment