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 dropout static when axis != None #37223

Merged
merged 16 commits into from
Nov 26, 2021

Conversation

smallv0221
Copy link
Contributor

PR types

Bug fixes

PR changes

APIs

Describe

Fix dropout static when axis != None

@paddle-bot-old
Copy link

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

@@ -940,6 +940,7 @@ def get_attrs(prog, dropout_prob, is_test, seed):

#get mask shape
input_shape = x.shape
input_shape_tensor = paddle.shape(x)
Copy link
Contributor

Choose a reason for hiding this comment

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

为了减小对性能的影响,是否区分动静态图呢

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是说动态图的时候可以少走一个op是么

x=input, p=0.7, axis=1, training=True, mode='upscale_in_train')

in_np = np.ones([40, 40]).astype("float32")
in_np2 = np.ones([1, 250000000]).astype("float32")
Copy link
Contributor

Choose a reason for hiding this comment

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

因为这个指定axis的分支不会走dropout op,感觉加的单测不用和去dropout OP比较,能跑下来就行,这个大size的单测可能会带来其他问题

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@guoshengCS guoshengCS merged commit f25fda3 into PaddlePaddle:develop Nov 26, 2021
smallv0221 added a commit to smallv0221/Paddle that referenced this pull request Nov 26, 2021
* fix dropout static when axis != None

* update dropout test

* add dropout test

* fix test

* Update test_dropout_op.py

* Update test_dropout_op.py

* fix testcase

* fix testcase

* Update test_dropout_op.py

* fix testcase

* fix testcase

* optimize perf

* add new test

* fix testcase
XiaoguangHu01 pushed a commit that referenced this pull request Nov 29, 2021
* fix dropout static when axis != None

* update dropout test

* add dropout test

* fix test

* Update test_dropout_op.py

* Update test_dropout_op.py

* fix testcase

* fix testcase

* Update test_dropout_op.py

* fix testcase

* fix testcase

* optimize perf

* add new test

* fix testcase
Zjq9409 pushed a commit to Zjq9409/Paddle that referenced this pull request Dec 10, 2021
* fix dropout static when axis != None

* update dropout test

* add dropout test

* fix test

* Update test_dropout_op.py

* Update test_dropout_op.py

* fix testcase

* fix testcase

* Update test_dropout_op.py

* fix testcase

* fix testcase

* optimize perf

* add new test

* fix testcase
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.

2 participants