Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최강혁
/
dddd
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
yunjey
2017-01-25 01:18:03 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eaa2d5ec3d195ae950e891977a36b3bdd0ae519e
eaa2d5ec
1 parent
4e56e6dc
name scope added
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
model.py
model.py
View file @
eaa2d5e
...
...
@@ -125,9 +125,10 @@ class DTN(object):
f_vars
=
[
var
for
var
in
t_vars
if
'content_extractor'
in
var
.
name
]
# train op
self
.
d_train_op_src
=
slim
.
learning
.
create_train_op
(
self
.
d_loss_src
,
self
.
d_optimizer_src
,
variables_to_train
=
d_vars
)
self
.
g_train_op_src
=
slim
.
learning
.
create_train_op
(
self
.
g_loss_src
,
self
.
g_optimizer_src
,
variables_to_train
=
g_vars
)
self
.
f_train_op_src
=
slim
.
learning
.
create_train_op
(
self
.
f_loss_src
,
self
.
f_optimizer_src
,
variables_to_train
=
f_vars
)
with
tf
.
name_scope
(
'source_train_op'
):
self
.
d_train_op_src
=
slim
.
learning
.
create_train_op
(
self
.
d_loss_src
,
self
.
d_optimizer_src
,
variables_to_train
=
d_vars
)
self
.
g_train_op_src
=
slim
.
learning
.
create_train_op
(
self
.
g_loss_src
,
self
.
g_optimizer_src
,
variables_to_train
=
g_vars
)
self
.
f_train_op_src
=
slim
.
learning
.
create_train_op
(
self
.
f_loss_src
,
self
.
f_optimizer_src
,
variables_to_train
=
f_vars
)
# summary op
d_loss_src_summary
=
tf
.
summary
.
scalar
(
'src_d_loss'
,
self
.
d_loss_src
)
...
...
@@ -158,8 +159,9 @@ class DTN(object):
self
.
g_optimizer_trg
=
tf
.
train
.
AdamOptimizer
(
self
.
learning_rate
)
# train op
self
.
d_train_op_trg
=
slim
.
learning
.
create_train_op
(
self
.
d_loss_trg
,
self
.
d_optimizer_trg
,
variables_to_train
=
d_vars
)
self
.
g_train_op_trg
=
slim
.
learning
.
create_train_op
(
self
.
g_loss_trg
,
self
.
g_optimizer_trg
,
variables_to_train
=
g_vars
)
with
tf
.
name_scope
(
'target_train_op'
):
self
.
d_train_op_trg
=
slim
.
learning
.
create_train_op
(
self
.
d_loss_trg
,
self
.
d_optimizer_trg
,
variables_to_train
=
d_vars
)
self
.
g_train_op_trg
=
slim
.
learning
.
create_train_op
(
self
.
g_loss_trg
,
self
.
g_optimizer_trg
,
variables_to_train
=
g_vars
)
# summary op
d_loss_fake_trg_summary
=
tf
.
summary
.
scalar
(
'trg_d_loss_fake'
,
self
.
d_loss_fake_trg
)
...
...
Please
register
or
login
to post a comment