Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
4cfd2159
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看板
提交
4cfd2159
编写于
11月 24, 2022
作者:
Y
Yang Nie
提交者:
Tingquan Gao
4月 04, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename cvt_{depth}_{size}x{size} to CvT_{depth}_{size}
上级
5c2a5655
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
14 deletion
+14
-14
ppcls/arch/backbone/__init__.py
ppcls/arch/backbone/__init__.py
+1
-1
ppcls/arch/backbone/model_zoo/cvt.py
ppcls/arch/backbone/model_zoo/cvt.py
+12
-12
ppcls/configs/ImageNet/CvT/cvt_13_224x224.yaml
ppcls/configs/ImageNet/CvT/cvt_13_224x224.yaml
+1
-1
未找到文件。
ppcls/arch/backbone/__init__.py
浏览文件 @
4cfd2159
...
...
@@ -75,7 +75,7 @@ from .model_zoo.foundation_vit import CLIP_vit_base_patch32_224, CLIP_vit_base_p
from
.model_zoo.convnext
import
ConvNeXt_tiny
,
ConvNeXt_small
,
ConvNeXt_base_224
,
ConvNeXt_base_384
,
ConvNeXt_large_224
,
ConvNeXt_large_384
from
.model_zoo.nextvit
import
NextViT_small_224
,
NextViT_base_224
,
NextViT_large_224
,
NextViT_small_384
,
NextViT_base_384
,
NextViT_large_384
from
.model_zoo.cae
import
cae_base_patch16_224
,
cae_large_patch16_224
from
.model_zoo.cvt
import
cvt_13_224x224
,
cvt_13_384x384
,
cvt_21_224x224
,
cvt_21_384x
384
from
.model_zoo.cvt
import
CvT_13_224
,
CvT_13_384
,
CvT_21_224
,
CvT_21_
384
from
.variant_models.resnet_variant
import
ResNet50_last_stage_stride1
from
.variant_models.resnet_variant
import
ResNet50_adaptive_max_pool2d
...
...
ppcls/arch/backbone/model_zoo/cvt.py
浏览文件 @
4cfd2159
...
...
@@ -22,10 +22,10 @@ from paddle.nn.initializer import XavierUniform, TruncatedNormal, Constant
from
....utils.save_load
import
load_dygraph_pretrain
,
load_dygraph_pretrain_from_url
MODEL_URLS
=
{
"
cvt_13_224x
224"
:
""
,
# TODO
"
cvt_13_384x
384"
:
""
,
# TODO
"
cvt_21_224x
224"
:
""
,
# TODO
"
cvt_21_384x
384"
:
""
,
# TODO
"
CvT_13_
224"
:
""
,
# TODO
"
CvT_13_
384"
:
""
,
# TODO
"
CvT_21_
224"
:
""
,
# TODO
"
CvT_21_
384"
:
""
,
# TODO
}
__all__
=
list
(
MODEL_URLS
.
keys
())
...
...
@@ -521,7 +521,7 @@ def _load_pretrained(pretrained, model, model_url, use_ssld=False):
)
def
cvt_13_224x
224
(
pretrained
=
False
,
use_ssld
=
False
,
**
kwargs
):
def
CvT_13_
224
(
pretrained
=
False
,
use_ssld
=
False
,
**
kwargs
):
msvit_spec
=
dict
(
INIT
=
'trunc_norm'
,
NUM_STAGES
=
3
,
...
...
@@ -551,11 +551,11 @@ def cvt_13_224x224(pretrained=False, use_ssld=False, **kwargs):
spec
=
msvit_spec
,
**
kwargs
)
_load_pretrained
(
pretrained
,
model
,
MODEL_URLS
[
"
cvt_13_224x
224"
],
use_ssld
=
use_ssld
)
pretrained
,
model
,
MODEL_URLS
[
"
CvT_13_
224"
],
use_ssld
=
use_ssld
)
return
model
def
cvt_13_384x
384
(
pretrained
=
False
,
use_ssld
=
False
,
**
kwargs
):
def
CvT_13_
384
(
pretrained
=
False
,
use_ssld
=
False
,
**
kwargs
):
msvit_spec
=
dict
(
INIT
=
'trunc_norm'
,
NUM_STAGES
=
3
,
...
...
@@ -585,11 +585,11 @@ def cvt_13_384x384(pretrained=False, use_ssld=False, **kwargs):
spec
=
msvit_spec
,
**
kwargs
)
_load_pretrained
(
pretrained
,
model
,
MODEL_URLS
[
"
cvt_13_384x
384"
],
use_ssld
=
use_ssld
)
pretrained
,
model
,
MODEL_URLS
[
"
CvT_13_
384"
],
use_ssld
=
use_ssld
)
return
model
def
cvt_21_224x
224
(
pretrained
=
False
,
use_ssld
=
False
,
**
kwargs
):
def
CvT_21_
224
(
pretrained
=
False
,
use_ssld
=
False
,
**
kwargs
):
msvit_spec
=
dict
(
INIT
=
'trunc_norm'
,
NUM_STAGES
=
3
,
...
...
@@ -619,11 +619,11 @@ def cvt_21_224x224(pretrained=False, use_ssld=False, **kwargs):
spec
=
msvit_spec
,
**
kwargs
)
_load_pretrained
(
pretrained
,
model
,
MODEL_URLS
[
"
cvt_21_224x
224"
],
use_ssld
=
use_ssld
)
pretrained
,
model
,
MODEL_URLS
[
"
CvT_21_
224"
],
use_ssld
=
use_ssld
)
return
model
def
cvt_21_384x
384
(
pretrained
=
False
,
use_ssld
=
False
,
**
kwargs
):
def
CvT_21_
384
(
pretrained
=
False
,
use_ssld
=
False
,
**
kwargs
):
msvit_spec
=
dict
(
INIT
=
'trunc_norm'
,
NUM_STAGES
=
3
,
...
...
@@ -653,5 +653,5 @@ def cvt_21_384x384(pretrained=False, use_ssld=False, **kwargs):
spec
=
msvit_spec
,
**
kwargs
)
_load_pretrained
(
pretrained
,
model
,
MODEL_URLS
[
"
cvt_21_384x
384"
],
use_ssld
=
use_ssld
)
pretrained
,
model
,
MODEL_URLS
[
"
CvT_21_
384"
],
use_ssld
=
use_ssld
)
return
model
ppcls/configs/ImageNet/CvT/cvt_13_224x224.yaml
浏览文件 @
4cfd2159
...
...
@@ -19,7 +19,7 @@ Global:
# model architecture
Arch
:
name
:
cvt_13_224x
224
name
:
CvT_13_
224
class_num
:
1000
# loss function config for traing/eval process
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录