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
8ad7e2b4
Commit
8ad7e2b4
authored
Jan 17, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix scope bug in DQN. fix #108
parent
e9da8f89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
examples/DeepQNetwork/DQN.py
examples/DeepQNetwork/DQN.py
+3
-2
No files found.
examples/DeepQNetwork/DQN.py
View file @
8ad7e2b4
...
...
@@ -124,8 +124,9 @@ class Model(ModelDesc):
best_v
=
tf
.
reduce_max
(
targetQ_predict_value
,
1
)
# N,
else
:
# Double-DQN
tf
.
get_variable_scope
()
.
reuse_variables
()
next_predict_value
=
self
.
_get_DQN_prediction
(
next_state
)
sc
=
tf
.
get_variable_scope
()
with
tf
.
variable_scope
(
sc
,
reuse
=
True
):
next_predict_value
=
self
.
_get_DQN_prediction
(
next_state
)
self
.
greedy_choice
=
tf
.
argmax
(
next_predict_value
,
1
)
# N,
predict_onehot
=
tf
.
one_hot
(
self
.
greedy_choice
,
NUM_ACTIONS
,
1.0
,
0.0
)
best_v
=
tf
.
reduce_sum
(
targetQ_predict_value
*
predict_onehot
,
1
)
...
...
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