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

add tensor.item tensor.tolist #6021

Merged
merged 26 commits into from
Aug 26, 2021
Merged

Conversation

Flowingsun007
Copy link
Contributor

@Flowingsun007 Flowingsun007 commented Aug 24, 2021

增加以下module、test case、docs

  • Tensor.item()
  • Tensor.tolist()

docs

image

image

@Flowingsun007 Flowingsun007 marked this pull request as ready for review August 24, 2021 07:19
@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 24, 2021 08:46
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 24, 2021 10:20
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 24, 2021 11:29
@Flowingsun007 Flowingsun007 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 24, 2021 13:00
@github-actions
Copy link
Contributor

CI failed, removing label automerge

@github-actions
Copy link
Contributor

CI failed, removing label automerge

@oneflow-ci-bot oneflow-ci-bot removed their request for review August 24, 2021 15:09
@jackalcooper
Copy link
Collaborator

CI发现问题就解决啊,为什么有很明显的错误不解决又一直把 automerge 加回来呢

@jackalcooper jackalcooper marked this pull request as draft August 24, 2021 17:07
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 138.4ms (= 6922.0ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.0ms (= 6400.0ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.08 (= 138.4ms / 128.0ms)

PyTorch resnet50 time: 84.7ms (= 4235.8ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.4ms (= 3722.3ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.14 (= 84.7ms / 74.4ms)

PyTorch resnet50 time: 53.2ms (= 2658.1ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 49.0ms (= 2450.5ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.08 (= 53.2ms / 49.0ms)

PyTorch resnet50 time: 48.1ms (= 2405.9ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 39.0ms (= 1948.5ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.23 (= 48.1ms / 39.0ms)

PyTorch resnet50 time: 42.5ms (= 2122.7ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 38.1ms (= 1906.2ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.11 (= 42.5ms / 38.1ms)

@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 25, 2021 14:44
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 25, 2021 17:06
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 25, 2021 18:17
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 25, 2021 19:58
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 25, 2021 21:23
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 25, 2021 22:11
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 25, 2021 23:34
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 26, 2021 00:49
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

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

PyTorch resnet50 time: 83.9ms (= 4192.9ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.5ms (= 3725.0ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.13 (= 83.9ms / 74.5ms)

PyTorch resnet50 time: 59.4ms (= 2971.0ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 47.3ms (= 2364.0ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.26 (= 59.4ms / 47.3ms)

PyTorch resnet50 time: 49.3ms (= 2464.5ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 43.3ms (= 2164.7ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.14 (= 49.3ms / 43.3ms)

PyTorch resnet50 time: 44.7ms (= 2236.3ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 37.0ms (= 1848.7ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.21 (= 44.7ms / 37.0ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review August 26, 2021 01:55
@oneflow-ci-bot oneflow-ci-bot merged commit b5478e0 into master Aug 26, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the support_tensor.item_tensor.tolost branch August 26, 2021 01:57
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