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
e42378ca
Commit
e42378ca
authored
Jul 31, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testdataspeed
parent
49cd9aec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
tensorpack/dataflow/common.py
tensorpack/dataflow/common.py
+14
-1
tensorpack/predict/base.py
tensorpack/predict/base.py
+1
-1
tensorpack/train/trainer.py
tensorpack/train/trainer.py
+1
-0
No files found.
tensorpack/dataflow/common.py
View file @
e42378ca
...
...
@@ -13,7 +13,20 @@ from ..utils import *
__all__
=
[
'BatchData'
,
'FixedSizeData'
,
'MapData'
,
'RepeatedData'
,
'MapDataComponent'
,
'RandomChooseData'
,
'RandomMixData'
,
'JoinData'
,
'ConcatData'
,
'SelectComponent'
,
'LocallyShuffleData'
]
'LocallyShuffleData'
,
'TestDataSpeed'
]
class
TestDataSpeed
(
ProxyDataFlow
):
def
__init__
(
self
,
ds
,
size
=
1000
):
super
(
TestDataSpeed
,
self
)
.
__init__
(
ds
)
self
.
test_size
=
size
def
get_data
(
self
):
from
tqdm
import
tqdm
with
tqdm
(
range
(
self
.
test_size
),
**
get_tqdm_kwargs
())
as
pbar
:
for
dp
in
self
.
ds
.
get_data
():
pbar
.
update
()
for
dp
in
self
.
ds
.
get_data
():
yield
dp
class
BatchData
(
ProxyDataFlow
):
def
__init__
(
self
,
ds
,
batch_size
,
remainder
=
False
):
...
...
tensorpack/predict/base.py
View file @
e42378ca
...
...
@@ -104,7 +104,7 @@ def build_multi_tower_prediction_graph(model, towers, prefix='towerp'):
model
.
_build_graph
(
input_vars
,
False
)
tf
.
get_variable_scope
()
.
reuse_variables
()
def
MultiTowerOfflinePredictor
(
OnlinePredictor
):
class
MultiTowerOfflinePredictor
(
OnlinePredictor
):
PREFIX
=
'towerp'
def
__init__
(
self
,
config
,
towers
):
self
.
graph
=
tf
.
Graph
()
...
...
tensorpack/train/trainer.py
View file @
e42378ca
...
...
@@ -112,6 +112,7 @@ class EnqueueThread(threading.Thread):
def
run
(
self
):
self
.
dataflow
.
reset_state
()
with
self
.
sess
.
as_default
():
try
:
while
True
:
...
...
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