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
8132387f
Commit
8132387f
authored
Nov 28, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MaskRCNN] from-scratch results
parent
0fa90c41
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
21 deletions
+33
-21
examples/FasterRCNN/README.md
examples/FasterRCNN/README.md
+25
-19
tensorpack/dataflow/parallel_map.py
tensorpack/dataflow/parallel_map.py
+8
-2
No files found.
examples/FasterRCNN/README.md
View file @
8132387f
This diff is collapsed.
Click to expand it.
tensorpack/dataflow/parallel_map.py
View file @
8132387f
...
...
@@ -116,6 +116,8 @@ class MultiThreadMapData(_ParallelMapData):
You can use **strict mode**, where `MultiThreadMapData.__iter__()`
is guaranteed to produce the exact set which `df.__iter__()`
produces. Although the order of data still isn't preserved.
The behavior of strict mode is undefined if the dataflow is infinite.
"""
class
_Worker
(
StoppableThread
):
def
__init__
(
self
,
inq
,
outq
,
evt
,
map_func
):
...
...
@@ -219,6 +221,8 @@ class MultiProcessMapDataZMQ(_ParallelMapData, _MultiProcessZMQDataFlow):
You can use **strict mode**, where `MultiProcessMapData.__iter__()`
is guaranteed to produce the exact set which `df.__iter__()`
produces. Although the order of data still isn't preserved.
The behavior of strict mode is undefined if the dataflow is infinite.
"""
class
_Worker
(
mp
.
Process
):
def
__init__
(
self
,
identity
,
map_func
,
pipename
,
hwm
):
...
...
@@ -405,8 +409,10 @@ if __name__ == '__main__':
return
x
ds
=
Zero
(
100
)
ds
=
MultiThreadMapData
(
ds
,
50
,
f
,
buffer_size
=
50
,
strict
=
Fals
e
)
ds
=
MultiThreadMapData
(
ds
,
50
,
f
,
buffer_size
=
50
,
strict
=
Tru
e
)
ds
.
reset_state
()
for
k
in
ds
:
for
idx
,
k
in
enumerate
(
ds
)
:
print
(
"Bang!"
,
k
)
if
idx
==
100
:
break
print
(
"END!"
)
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