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 default_generator.seed() as random_seed in init #5721

Merged
merged 16 commits into from
Aug 6, 2021

Conversation

daquexian
Copy link
Contributor

修复没有设置 random_seed 导致的多次运行 tensor.normal_() 等随机初始化方法得到的数据一样的问题

Signed-off-by: daquexian <daquexian566@gmail.com>
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 4, 2021 07:13
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 4, 2021 10:17
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 4, 2021 10:17
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2021

CI failed, removing label automerge

@github-actions github-actions bot removed the automerge label Aug 4, 2021
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 4, 2021 12:38
Signed-off-by: daquexian <daquexian566@gmail.com>
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 4, 2021 14:35
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 4, 2021 16:59
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2021

CI failed, removing label automerge

@github-actions github-actions bot removed the automerge label Aug 4, 2021
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 4, 2021 17:46
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 5, 2021 10:02
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 5, 2021 16:28
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 5, 2021 20:32
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 5, 2021 22:52
@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2021

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 141.2ms (= 7062.0ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.5ms (= 6422.7ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.10 (= 141.2ms / 128.5ms)

PyTorch resnet50 time: 83.8ms (= 4192.3ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.3ms (= 3717.3ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.13 (= 83.8ms / 74.3ms)

PyTorch resnet50 time: 54.6ms (= 2732.1ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 49.6ms (= 2482.1ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.10 (= 54.6ms / 49.6ms)

PyTorch resnet50 time: 49.0ms (= 2447.9ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 40.7ms (= 2034.5ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.20 (= 49.0ms / 40.7ms)

PyTorch resnet50 time: 42.6ms (= 2130.4ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 41.5ms (= 2076.2ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.03 (= 42.6ms / 41.5ms)

@oneflow-ci-bot oneflow-ci-bot merged commit 7f60b5c into master Aug 6, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the fix_init_seed branch August 6, 2021 03:32
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.

3 participants