-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix xmap_readers and refine flowers dataset #2631
Conversation
wanghaoshuang
commented
Jun 28, 2017
- fix xmap_readers bug . fix 过一个pass就停止不动了,内存占用着,但是cpu和gpu都为0了,就一直不动了 #2619
- refine flowers dataset reader. fix There is a bug on paddle.v2.dataset.flowers #2487
python/paddle/v2/dataset/flowers.py
Outdated
@@ -63,22 +63,23 @@ def reader_creator(data_file, | |||
setid_file, | |||
dataset_name, | |||
mapper=default_mapper, | |||
buffered_size=1024): | |||
buffered_size=1024, | |||
useXmap=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useXmap -> use_xmap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx.
python/paddle/v2/dataset/flowers.py
Outdated
@@ -151,15 +154,15 @@ def test(mapper=default_mapper, buffered_size=1024): | |||
return reader_creator( | |||
download(DATA_URL, 'flowers', DATA_MD5), | |||
download(LABEL_URL, 'flowers', LABEL_MD5), | |||
download(SETID_URL, 'flowers', SETID_MD5), 'tstid', mapper, | |||
buffered_size) | |||
download(SETID_URL, 'flowers', SETID_MD5), 'trnid', mapper, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to add some comments why change the tstid
to trnid
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.
workers.append(worker) | ||
for w in workers: | ||
w.start() | ||
|
||
def xreader(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unfamiliar with this part, should we put xreader in another file?
decorator function take reader as input, and an enhanced feature function is returned. xreader is more likely a 1 reader n writer pool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xmap_readers
is like map_readers
in decorator.py. They are truly decorators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get it. LGTM.
1. rename 'useXmap' to 'use_xmap' 2. add comments about exchanging train data and test data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTGM.