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
6e7eef04
You need to sign in or sign up before continuing.
Commit
6e7eef04
authored
Jun 01, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix in expreplay
parent
ec726f6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
tensorpack/RL/expreplay.py
tensorpack/RL/expreplay.py
+8
-0
tensorpack/tfutils/sessinit.py
tensorpack/tfutils/sessinit.py
+3
-1
No files found.
tensorpack/RL/expreplay.py
View file @
6e7eef04
...
...
@@ -52,6 +52,14 @@ class ExpReplay(DataFlow, Callback):
def
init_memory
(
self
):
logger
.
info
(
"Populating replay memory..."
)
# fill some for the history
old_exploration
=
self
.
exploration
self
.
exploration
=
1
for
k
in
range
(
self
.
history_len
):
self
.
_populate_exp
()
self
.
exploration
=
old_exploration
with
tqdm
(
total
=
self
.
populate_size
)
as
pbar
:
while
len
(
self
.
mem
)
<
self
.
populate_size
:
self
.
_populate_exp
()
...
...
tensorpack/tfutils/sessinit.py
View file @
6e7eef04
...
...
@@ -90,7 +90,6 @@ class SaverRestore(SessionInit):
del
vars_multimap
[
k
]
yield
ret
@
staticmethod
def
_read_checkpoint_vars
(
model_path
):
reader
=
tf
.
train
.
NewCheckpointReader
(
model_path
)
...
...
@@ -112,8 +111,11 @@ class SaverRestore(SessionInit):
name
=
new_name
if
name
in
vars_available
:
var_dict
[
name
]
.
append
(
v
)
vars_available
.
remove
(
name
)
else
:
logger
.
warn
(
"Param {} not found in checkpoint! Will not restore."
.
format
(
v
.
op
.
name
))
#for name in vars_available:
#logger.warn("Param {} in checkpoint doesn't appear in the graph!".format(name))
return
var_dict
class
ParamRestore
(
SessionInit
):
...
...
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