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
d3d368ff
Commit
d3d368ff
authored
Nov 14, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CycleGAN] no soft label (#331)
parent
4db43fec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/GAN/CycleGAN.py
examples/GAN/CycleGAN.py
+2
-2
No files found.
examples/GAN/CycleGAN.py
View file @
d3d368ff
...
...
@@ -130,11 +130,11 @@ class Model(GANModelDesc):
B_dis_fake
=
self
.
discriminator
(
AB
)
def
LSGAN_losses
(
real
,
fake
):
d_real
=
tf
.
reduce_mean
(
tf
.
squared_difference
(
real
,
0.9
),
name
=
'd_real'
)
d_real
=
tf
.
reduce_mean
(
tf
.
squared_difference
(
real
,
1
),
name
=
'd_real'
)
d_fake
=
tf
.
reduce_mean
(
tf
.
square
(
fake
),
name
=
'd_fake'
)
d_loss
=
tf
.
multiply
(
d_real
+
d_fake
,
0.5
,
name
=
'd_loss'
)
g_loss
=
tf
.
reduce_mean
(
tf
.
squared_difference
(
fake
,
0.9
),
name
=
'g_loss'
)
g_loss
=
tf
.
reduce_mean
(
tf
.
squared_difference
(
fake
,
1
),
name
=
'g_loss'
)
add_moving_summary
(
g_loss
,
d_loss
)
return
g_loss
,
d_loss
...
...
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