Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
973cdef1
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
大约 1 年 前同步成功
通知
115
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
973cdef1
编写于
7月 15, 2022
作者:
C
cuicheng01
提交者:
GitHub
7月 15, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2154 from cuicheng01/fix_pelee_convnext
Fix pelee convnext
上级
efa61941
6cfdf8af
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
38 deletion
+28
-38
ppcls/arch/backbone/model_zoo/convnext.py
ppcls/arch/backbone/model_zoo/convnext.py
+11
-19
ppcls/arch/backbone/model_zoo/peleenet.py
ppcls/arch/backbone/model_zoo/peleenet.py
+11
-19
ppcls/configs/ImageNet/PeleeNet/PeleeNet.yaml
ppcls/configs/ImageNet/PeleeNet/PeleeNet.yaml
+6
-0
未找到文件。
ppcls/arch/backbone/model_zoo/convnext.py
浏览文件 @
973cdef1
#
MIT License
#
copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
#
# Copyright (c) Meta Platforms, Inc. and affiliates.
# 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
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# http://www.apache.org/licenses/LICENSE-2.0
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# 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.
#
# Code was heavily based on https://github.com/facebookresearch/ConvNeXt
...
...
@@ -138,7 +130,7 @@ class Block(nn.Layer):
class
ConvNeXt
(
nn
.
Layer
):
r
""" ConvNeXt
A P
yTorch
impl of : `A ConvNet for the 2020s` -
A P
addlePaddle
impl of : `A ConvNet for the 2020s` -
https://arxiv.org/pdf/2201.03545.pdf
Args:
...
...
ppcls/arch/backbone/model_zoo/peleenet.py
浏览文件 @
973cdef1
# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
#
# MIT License
# 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
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# http://www.apache.org/licenses/LICENSE-2.0
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# 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.
#
# Code was heavily based on https://github.com/Robert-JunWang/PeleeNet
# reference: https://arxiv.org/pdf/1804.06882.pdf
...
...
@@ -33,7 +25,7 @@ from paddle.nn.initializer import Normal, Constant
from
ppcls.utils.save_load
import
load_dygraph_pretrain
,
load_dygraph_pretrain_from_url
MODEL_URLS
=
{
"
peleen
et"
:
""
# TODO
"
PeleeN
et"
:
""
# TODO
}
__all__
=
MODEL_URLS
.
keys
()
...
...
@@ -235,5 +227,5 @@ def _load_pretrained(pretrained, model, model_url, use_ssld):
def
PeleeNet
(
pretrained
=
False
,
use_ssld
=
False
,
**
kwargs
):
model
=
PeleeNetDY
(
**
kwargs
)
_load_pretrained
(
pretrained
,
model
,
MODEL_URLS
[
"
peleen
et"
],
use_ssld
)
_load_pretrained
(
pretrained
,
model
,
MODEL_URLS
[
"
PeleeN
et"
],
use_ssld
)
return
model
ppcls/configs/ImageNet/PeleeNet/PeleeNet.yaml
浏览文件 @
973cdef1
...
...
@@ -55,6 +55,8 @@ DataLoader:
channel_first
:
False
-
RandCropImage
:
size
:
224
interpolation
:
bilinear
backend
:
pil
-
RandFlipImage
:
flip_code
:
1
-
NormalizeImage
:
...
...
@@ -83,6 +85,8 @@ DataLoader:
channel_first
:
False
-
ResizeImage
:
resize_short
:
256
interpolation
:
bilinear
backend
:
pil
-
CropImage
:
size
:
224
-
NormalizeImage
:
...
...
@@ -108,6 +112,8 @@ Infer:
channel_first
:
False
-
ResizeImage
:
resize_short
:
256
interpolation
:
bilinear
backend
:
pil
-
CropImage
:
size
:
224
-
NormalizeImage
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录