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
a812979a
Commit
a812979a
authored
Oct 31, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delay stagingarea initialize to the first iteration. (fix #461)
parent
ccef4d4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
tensorpack/input_source/input_source.py
tensorpack/input_source/input_source.py
+6
-1
No files found.
tensorpack/input_source/input_source.py
View file @
a812979a
...
@@ -414,13 +414,18 @@ class StagingInput(FeedfreeInput):
...
@@ -414,13 +414,18 @@ class StagingInput(FeedfreeInput):
self
.
stage_op
=
stage_op
self
.
stage_op
=
stage_op
self
.
fetches
=
tf
.
train
.
SessionRunArgs
(
self
.
fetches
=
tf
.
train
.
SessionRunArgs
(
fetches
=
[
stage_op
,
unstage_op
])
fetches
=
[
stage_op
,
unstage_op
])
self
.
_initialized
=
False
def
_
before_train
(
self
):
def
_
prefill
(
self
):
logger
.
info
(
"Pre-filling staging area ..."
)
logger
.
info
(
"Pre-filling staging area ..."
)
for
k
in
range
(
self
.
nr_stage
):
for
k
in
range
(
self
.
nr_stage
):
self
.
stage_op
.
run
()
self
.
stage_op
.
run
()
def
_before_run
(
self
,
ctx
):
def
_before_run
(
self
,
ctx
):
# This has to happen once, right before the first iteration.
if
not
self
.
_initialized
:
self
.
_initialized
=
True
self
.
_prefill
()
return
self
.
fetches
return
self
.
fetches
def
__init__
(
self
,
input
,
towers
,
nr_stage
=
5
):
def
__init__
(
self
,
input
,
towers
,
nr_stage
=
5
):
...
...
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