-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
【PaddlePaddle Hackathon 2】24、为 Paddle 新增 nn.ChannelShuffle 组网 API #40743
Merged
jeff41404
merged 34 commits into
PaddlePaddle:develop
from
BrilliantYuKaimin:channel_shuffle
Apr 25, 2022
Merged
Changes from 5 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
d7ffa2c
Add infermeta for ChannelShuffle
BrilliantYuKaimin b1f6915
Create channel_shuffle_grad_kernel.h
BrilliantYuKaimin 6ca6e5c
Create channel_shuffle_kernel.h
BrilliantYuKaimin 9b5fa40
Create channel_shuffle_sig.cc
BrilliantYuKaimin 7d77d46
Create channel_shuffle_op.cc
BrilliantYuKaimin 4c34c10
Create channel_shuffle_kernel_impl.h
BrilliantYuKaimin be4df84
Create channel_shuffle_grad_kernel_impl.h
BrilliantYuKaimin 51829fc
Add kernel register of channel shuffle and grad
BrilliantYuKaimin 25feafb
add nn.functional.channel_shuffle
BrilliantYuKaimin 2f1a958
add nn.ChannelShuffle
BrilliantYuKaimin d515b55
Create test_channel_shuffle.py
BrilliantYuKaimin fa164be
Update example of ChannelShuffle in vision.py
BrilliantYuKaimin 1a29a72
Update test_channel_shuffle.py
BrilliantYuKaimin cc32215
修改channel_shuffle核函数的实现位置
BrilliantYuKaimin 0c9dd64
修正代码格式
BrilliantYuKaimin cd6fe41
删除多余空格
BrilliantYuKaimin 1cfdfd3
完善channel_shuffle的错误检查
BrilliantYuKaimin 5cc340d
Update unary.cc
BrilliantYuKaimin 88f6e2b
Update channel_shuffle_op.cc
BrilliantYuKaimin b848e45
Update test_channel_shuffle.py
BrilliantYuKaimin e927fc4
Update unary.cc
BrilliantYuKaimin c0d5651
add channel_shuffle
BrilliantYuKaimin 3a7d322
Update test_channel_shuffle.py
BrilliantYuKaimin 56f7951
Update vision.py
BrilliantYuKaimin 048ef2b
调整代码格式
BrilliantYuKaimin 76feb34
Merge branch 'PaddlePaddle:develop' into channel_shuffle
BrilliantYuKaimin 11b3b03
Update channel_shuffle_sig.cc
BrilliantYuKaimin 2362233
更新ChannelShuffle的文档
BrilliantYuKaimin dd9be7f
更新channel_shuffle的文档
BrilliantYuKaimin c4c7862
Merge branch 'PaddlePaddle:develop' into channel_shuffle
BrilliantYuKaimin d7ae774
remove ChannelShuffleOpArgumentMapping
BrilliantYuKaimin dbb8fd9
add ChannelShuffleGradInferMeta
BrilliantYuKaimin 37d4a5e
Update channel_shuffle_op.cc
BrilliantYuKaimin e29fb30
调整channel_shuffle及其梯度的核函数的位置
BrilliantYuKaimin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "paddle/phi/kernels/channel_shuffle_grad_kernel.h" | ||
#include "paddle/phi/kernels/impl/channel_shuffle_grad_kernel_impl.h" | ||
|
||
#include "paddle/phi/backends/cpu/cpu_context.h" | ||
#include "paddle/phi/core/kernel_registry.h" | ||
|
||
PD_REGISTER_KERNEL(channel_shuffle_grad, | ||
CPU, | ||
ALL_LAYOUT, | ||
phi::ChannelShuffleGradKernel, | ||
float, | ||
double) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "paddle/phi/kernels/channel_shuffle_kernel.h" | ||
#include "paddle/phi/kernels/impl/channel_shuffle_kernel_impl.h" | ||
|
||
#include "paddle/phi/backends/cpu/cpu_context.h" | ||
#include "paddle/phi/core/kernel_registry.h" | ||
|
||
PD_REGISTER_KERNEL(channel_shuffle, | ||
CPU, | ||
ALL_LAYOUT, | ||
phi::ChannelShuffleKernel, | ||
float, | ||
double) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "paddle/phi/kernels/channel_shuffle_grad_kernel.h" | ||
#include "paddle/phi/kernels/impl/channel_shuffle_grad_kernel_impl.h" | ||
|
||
#include "paddle/phi/backends/gpu/gpu_context.h" | ||
#include "paddle/phi/core/kernel_registry.h" | ||
|
||
PD_REGISTER_KERNEL(channel_shuffle_grad, | ||
GPU, | ||
ALL_LAYOUT, | ||
phi::ChannelShuffleGradKernel, | ||
float, | ||
double) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "paddle/phi/kernels/channel_shuffle_kernel.h" | ||
#include "paddle/phi/kernels/impl/channel_shuffle_kernel_impl.h" | ||
|
||
#include "paddle/phi/backends/gpu/gpu_context.h" | ||
#include "paddle/phi/core/kernel_registry.h" | ||
|
||
PD_REGISTER_KERNEL(channel_shuffle, | ||
GPU, | ||
ALL_LAYOUT, | ||
phi::ChannelShuffleKernel, | ||
float, | ||
double) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
按照这个修改下吧~