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

fix docstring in oneflow.nn.functional namespace #5807

Merged
merged 9 commits into from
Aug 16, 2021

Conversation

kevinzhangcode
Copy link
Contributor

@kevinzhangcode kevinzhangcode commented Aug 9, 2021

解决问题:
1、参数比实际函数原型里多的情况
image

2、链接不显示
image

functional API 认领人 问题 修复情况
conv1d 张舸航 多了参数padding_mode、scale、zero_point、dtype y
conv2d 张舸航 多了参数padding_mode、scale、zero_point、dtype y
conv3d 张舸航 多了参数padding_mode、scale、zero_point、dtype y
adaptive_avg_pool1d 张舸航 y
adaptive_avg_pool2d 张舸航 y
adaptive_avg_pool3d 张舸航 y
relu 张舸航 y
hardtanh 张舸航 y
hardsigmoid 张舸航 多了inplace参数 y
hardswish 刘圻 y
leaky_relu 刘圻 y
elu 刘圻 y
selu 刘圻 y
sigmoid 刘圻 y
prelu 刘圻 Y
gelu 刘圻 y
logsigmoid 刘圻 y
softsign 刘圻 y
softmax 刘圻 y
softplus 张长昊 ok y
tanh 张长昊 ok y
silu 张长昊 函数原型的参数没写到函数括号里面 y
mish 张长昊 See : class:~oneflow.nn.Mish for more details. 没有对应链接 y
dropout 张长昊 ok y
pad 张长昊 ooneflow.nn.ReflectionPad2d, andooneflow.nn.ReplicationPad2d 没有对应链接,且oneflow多打了个o y
upsample 张长昊 参数比函数原型里的少width_scale ,第一句话Upsample->Upsamples y

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

@doombeaker
Copy link
Contributor

selu 的文档还不够好看,公式最好是另起一行,可以参考本 PR 的 mish 等的文档截图。

@doombeaker doombeaker marked this pull request as ready for review August 16, 2021 02:37
@kevinzhangcode
Copy link
Contributor Author

selu修改
image

@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 16, 2021 04:04
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 16, 2021 05:44
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 139.2ms (= 6958.6ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.3ms (= 6414.9ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.08 (= 139.2ms / 128.3ms)

PyTorch resnet50 time: 85.4ms (= 4272.3ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.5ms (= 3724.4ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.15 (= 85.4ms / 74.5ms)

PyTorch resnet50 time: 62.2ms (= 3111.1ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 48.1ms (= 2406.5ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.29 (= 62.2ms / 48.1ms)

PyTorch resnet50 time: 51.7ms (= 2584.1ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 41.3ms (= 2062.5ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.25 (= 51.7ms / 41.3ms)

PyTorch resnet50 time: 44.2ms (= 2210.2ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 42.6ms (= 2129.1ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.04 (= 44.2ms / 42.6ms)

@oneflow-ci-bot oneflow-ci-bot merged commit a4fddb3 into master Aug 16, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the fix_nn_functional_methods branch August 16, 2021 06:28
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