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
f16aef9d
Commit
f16aef9d
authored
Dec 31, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dependencies
parent
97f47539
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
examples/GAN/GAN.py
examples/GAN/GAN.py
+5
-8
No files found.
examples/GAN/GAN.py
View file @
f16aef9d
...
...
@@ -22,16 +22,13 @@ class GANTrainer(FeedfreeTrainer):
actual_inputs
=
self
.
_get_input_tensors
()
self
.
model
.
build_graph
(
actual_inputs
)
self
.
g_min
=
self
.
config
.
optimizer
.
minimize
(
self
.
model
.
g_loss
,
var_list
=
self
.
model
.
g_vars
,
name
=
'g_op'
,
gate_gradients
=
tf
.
train
.
Optimizer
.
GATE_NONE
)
self
.
d_min
=
self
.
config
.
optimizer
.
minimize
(
self
.
model
.
d_loss
,
var_list
=
self
.
model
.
d_vars
,
name
=
'd_op'
,
gate_gradients
=
tf
.
train
.
Optimizer
.
GATE_NONE
)
var_list
=
self
.
model
.
g_vars
,
name
=
'g_op'
)
with
tf
.
control_dependencies
([
self
.
g_min
]):
self
.
d_min
=
self
.
config
.
optimizer
.
minimize
(
self
.
model
.
d_loss
,
var_list
=
self
.
model
.
d_vars
,
name
=
'd_op'
)
self
.
gs_incr
=
tf
.
assign_add
(
get_global_step_var
(),
1
,
name
=
'global_step_incr'
)
self
.
summary_op
=
summary_moving_average
()
with
tf
.
control_dependencies
([
self
.
g_min
]):
self
.
d_min
=
tf
.
group
(
self
.
d_min
,
self
.
summary_op
,
self
.
gs_incr
)
self
.
train_op
=
self
.
d_min
self
.
train_op
=
tf
.
group
(
self
.
d_min
,
self
.
summary_op
,
self
.
gs_incr
)
def
run_step
(
self
):
self
.
sess
.
run
(
self
.
train_op
)
...
...
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