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
a979a3f3
Commit
a979a3f3
authored
Dec 09, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix image summary
parent
8abdaf77
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
examples/GAN/DCGAN-CelebA.py
examples/GAN/DCGAN-CelebA.py
+2
-3
examples/GAN/Image2Image.py
examples/GAN/Image2Image.py
+1
-1
examples/GAN/InfoGAN-mnist.py
examples/GAN/InfoGAN-mnist.py
+1
-1
No files found.
examples/GAN/DCGAN-CelebA.py
View file @
a979a3f3
...
...
@@ -75,7 +75,7 @@ class Model(ModelDesc):
W_init
=
tf
.
truncated_normal_initializer
(
stddev
=
0.02
)):
with
tf
.
variable_scope
(
'gen'
):
image_gen
=
self
.
generator
(
z
)
tf
.
summary
.
image
(
'gen'
,
image_gen
,
max_
image
s
=
30
)
tf
.
summary
.
image
(
'gen'
,
image_gen
,
max_
output
s
=
30
)
with
tf
.
variable_scope
(
'discrim'
):
vecpos
=
self
.
discriminator
(
image_pos
)
with
tf
.
variable_scope
(
'discrim'
,
reuse
=
True
):
...
...
@@ -105,12 +105,11 @@ def get_config():
optimizer
=
tf
.
train
.
AdamOptimizer
(
lr
,
beta1
=
0.5
,
epsilon
=
1e-3
),
callbacks
=
Callbacks
([
StatPrinter
(),
ModelSaver
(),
ScheduledHyperParamSetter
(
'learning_rate'
,
[(
200
,
1e-4
)])
]),
session_config
=
get_default_sess_config
(
0.5
),
model
=
Model
(),
step_per_epoch
=
300
,
max_epoch
=
3
00
,
max_epoch
=
2
00
,
)
def
sample
(
model_path
):
...
...
examples/GAN/Image2Image.py
View file @
a979a3f3
...
...
@@ -117,7 +117,7 @@ class Model(ModelDesc):
fake_output
=
tf
.
image
.
grayscale_to_rgb
(
fake_output
)
viz
=
(
tf
.
concat
(
2
,
[
input
,
output
,
fake_output
])
+
1.0
)
*
128.0
viz
=
tf
.
cast
(
tf
.
clip_by_value
(
viz
,
0
,
255
),
tf
.
uint8
,
name
=
'viz'
)
tf
.
image_summary
(
'gen'
,
viz
,
max_
image
s
=
max
(
30
,
BATCH
))
tf
.
image_summary
(
'gen'
,
viz
,
max_
output
s
=
max
(
30
,
BATCH
))
all_vars
=
tf
.
trainable_variables
()
self
.
g_vars
=
[
v
for
v
in
all_vars
if
v
.
name
.
startswith
(
'gen/'
)]
...
...
examples/GAN/InfoGAN-mnist.py
View file @
a979a3f3
...
...
@@ -66,7 +66,7 @@ class Model(ModelDesc):
W_init
=
tf
.
truncated_normal_initializer
(
stddev
=
0.02
)):
with
tf
.
variable_scope
(
'gen'
):
image_gen
=
self
.
generator
(
z
)
tf
.
summary
.
image
(
'gen'
,
image_gen
,
max_
image
s
=
30
)
tf
.
summary
.
image
(
'gen'
,
image_gen
,
max_
output
s
=
30
)
with
tf
.
variable_scope
(
'discrim'
):
vecpos
,
_
=
self
.
discriminator
(
image_pos
)
with
tf
.
variable_scope
(
'discrim'
,
reuse
=
True
):
...
...
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