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

use flow.randperm #5928

Merged
merged 3 commits into from
Aug 17, 2021
Merged

use flow.randperm #5928

merged 3 commits into from
Aug 17, 2021

Conversation

Flowingsun007
Copy link
Contributor

@Flowingsun007 Flowingsun007 commented Aug 17, 2021

用flow.randperm替换np方法

>>> x = flow.randperm(10).tolist()
>>> x
[0, 7, 4, 1, 2, 6, 3, 5, 9, 8]

@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 17, 2021 13:44
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 17, 2021 14:29
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 140.8ms (= 7042.4ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.0ms (= 6398.1ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.10 (= 140.8ms / 128.0ms)

PyTorch resnet50 time: 83.2ms (= 4158.8ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.1ms (= 3705.4ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.12 (= 83.2ms / 74.1ms)

PyTorch resnet50 time: 56.5ms (= 2826.8ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 48.1ms (= 2403.0ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.18 (= 56.5ms / 48.1ms)

PyTorch resnet50 time: 47.5ms (= 2374.9ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 39.4ms (= 1971.5ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.20 (= 47.5ms / 39.4ms)

PyTorch resnet50 time: 43.5ms (= 2173.7ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 37.6ms (= 1879.4ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.16 (= 43.5ms / 37.6ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review August 17, 2021 16:08
@oneflow-ci-bot oneflow-ci-bot merged commit e5f808c into master Aug 17, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the use_flow.randperm_in_sampler branch August 17, 2021 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants