Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
X2Paddle
提交
685c8ce9
X
X2Paddle
项目概览
PaddlePaddle
/
X2Paddle
大约 1 年 前同步成功
通知
328
Star
698
Fork
167
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
26
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
X2Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
26
Issue
26
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
685c8ce9
编写于
3月 31, 2023
作者:
J
Jason
提交者:
GitHub
3月 31, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #952 from wjj19950828/support_yolov8cls
[Bug]Support YOLOv8-cls
上级
c4295152
96501c66
变更
3
展开全部
显示空白变更内容
内联
并排
Showing
3 changed file
with
12 addition
and
724 deletion
+12
-724
x2paddle/op_mapper/caffe2paddle/caffe_op_mapper.py
x2paddle/op_mapper/caffe2paddle/caffe_op_mapper.py
+9
-3
x2paddle/op_mapper/prim2code.py
x2paddle/op_mapper/prim2code.py
+0
-720
x2paddle/op_mapper/pytorch2paddle/pytorch_op_mapper.py
x2paddle/op_mapper/pytorch2paddle/pytorch_op_mapper.py
+3
-1
未找到文件。
x2paddle/op_mapper/caffe2paddle/caffe_op_mapper.py
浏览文件 @
685c8ce9
...
@@ -796,11 +796,17 @@ class CaffeOpMapper():
...
@@ -796,11 +796,17 @@ class CaffeOpMapper():
inputs
=
inputs_dict
,
inputs
=
inputs_dict
,
outputs
=
[
node
.
layer_name
+
"_mul"
])
outputs
=
[
node
.
layer_name
+
"_mul"
])
else
:
else
:
new_shape
=
[
1
]
*
len
(
node
.
in_shapes
[
0
])
new_shape
[
axis
]
=
node
.
in_shapes
[
0
][
1
]
self
.
paddle_graph
.
add_layer
(
self
.
paddle_graph
.
add_layer
(
"paddle.fluid.layers.elementwise_mul"
,
"paddle.reshape"
,
inputs
=
{
"x"
:
node
.
layer_name
+
"_cparam1"
},
outputs
=
[
node
.
layer_name
+
"_cparam1"
],
shape
=
new_shape
)
self
.
paddle_graph
.
add_layer
(
"paddle.multiply"
,
inputs
=
inputs_dict
,
inputs
=
inputs_dict
,
outputs
=
[
node
.
layer_name
+
"_mul"
],
outputs
=
[
node
.
layer_name
+
"_mul"
])
axis
=
axis
)
self
.
paddle_graph
.
add_layer
(
self
.
paddle_graph
.
add_layer
(
"self.create_parameter"
,
"self.create_parameter"
,
inputs
=
{},
inputs
=
{},
...
...
x2paddle/op_mapper/prim2code.py
已删除
100644 → 0
浏览文件 @
c4295152
此差异已折叠。
点击以展开。
x2paddle/op_mapper/pytorch2paddle/pytorch_op_mapper.py
浏览文件 @
685c8ce9
...
@@ -311,7 +311,9 @@ class PyTorchOpMapper():
...
@@ -311,7 +311,9 @@ class PyTorchOpMapper():
last_name_segments
=
scope_name_part
[
index
].
split
(
"."
)
last_name_segments
=
scope_name_part
[
index
].
split
(
"."
)
name_segments
=
scope_name_part
[
index
+
1
].
split
(
"."
)
name_segments
=
scope_name_part
[
index
+
1
].
split
(
"."
)
for
j
,
name
in
enumerate
(
last_name_segments
):
for
j
,
name
in
enumerate
(
last_name_segments
):
name_segments
[
j
]
=
name
if
j
<
len
(
name_segments
)
and
name_segments
[
j
]
==
name
:
continue
name_segments
.
insert
(
j
,
name
)
scope_name_part
[
index
+
1
]
=
"."
.
join
(
name_segments
)
scope_name_part
[
index
+
1
]
=
"."
.
join
(
name_segments
)
last_name
=
scope_name_part
[
-
1
]
last_name
=
scope_name_part
[
-
1
]
name_segments
=
last_name
.
split
(
"."
)
name_segments
=
last_name
.
split
(
"."
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录