Skip to content
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

Optimize 102Flowers dataset reading speed #31408

Merged
merged 5 commits into from
May 19, 2021
Merged

Optimize 102Flowers dataset reading speed #31408

merged 5 commits into from
May 19, 2021

Conversation

GT-ZhangAcer
Copy link
Member

@GT-ZhangAcer GT-ZhangAcer commented Mar 3, 2021

PR types

Others

PR changes

Others

Describe

Fix slow data reading, In the old version, one epoch read time of this data set was about 5371 seconds(MacBook Pro Retina, 13-inch, Early 2015 2.7 GHz), and a batch(32) took 211 seconds, It's too painful to use.
Now decompress the data in advance (about 10 seconds). Each epoch of reading takes about 3 seconds(MacBook Pro Retina, 13-inch, Early 2015 2.7 GHz), and a batch(32) takes 0.017 seconds.

Test sample

import paddle
import time

start = time.time()
data = paddle.vision.datasets.Flowers()


for idx, _ in enumerate(data):
    print(idx)

print("cost:", time.time() - start)

…s data set was about 5371 seconds(MacBook Pro Retina, 13-inch, Early 2015 2.7 GHz), and a batch took 211 seconds, It's too painful to use. Now decompress the data in advance (about 10 seconds). Each epoch of reading takes about 3 seconds(MacBook Pro Retina, 13-inch, Early 2015 2.7 GHz), and a batch takes 0.017 seconds more.
@paddle-bot-old
Copy link

paddle-bot-old bot commented Mar 3, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

liuhuiCNN
liuhuiCNN previously approved these changes Mar 4, 2021
Copy link
Contributor

@liuhuiCNN liuhuiCNN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paddle-bot-old
Copy link

Sorry to inform you that 33ab88b's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Copy link
Contributor

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TCChenlong TCChenlong merged commit 67c2700 into PaddlePaddle:develop May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants