Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
正统之独孤求败
mindspore
提交
9638139e
M
mindspore
项目概览
正统之独孤求败
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9638139e
编写于
8月 12, 2020
作者:
K
kai00
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed format trans
上级
1351d5f4
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
4 addition
and
3 deletion
+4
-3
mindspore/lite/src/common/anf_importer/import_from_protobuf.cc
...pore/lite/src/common/anf_importer/import_from_protobuf.cc
+1
-0
mindspore/lite/tools/common/node_util.cc
mindspore/lite/tools/common/node_util.cc
+1
-1
mindspore/lite/tools/common/node_util.h
mindspore/lite/tools/common/node_util.h
+1
-1
mindspore/lite/tools/converter/legacy_optimizer/node/weight_format_pass.cc
...ols/converter/legacy_optimizer/node/weight_format_pass.cc
+1
-1
未找到文件。
mindspore/lite/src/common/anf_importer/import_from_protobuf.cc
浏览文件 @
9638139e
...
...
@@ -1168,6 +1168,7 @@ int AnfImporterFromProtobuf::Import() {
const
onnx
::
GraphProto
&
graphBuild
=
onnx_model_
->
graph
();
if
(
!
BuildFuncGraph
(
dstGraph
,
graphBuild
))
{
MS_LOG
(
ERROR
)
<<
"Build funcgraph failed!"
;
func_graph_
=
nullptr
;
return
RET_ERROR
;
}
func_graph_
=
dstGraph
;
...
...
mindspore/lite/tools/common/node_util.cc
浏览文件 @
9638139e
...
...
@@ -96,7 +96,7 @@ static const std::vector<schema::PrimitiveType> nhwcOpList = {
schema
::
PrimitiveType_Conv2D
,
schema
::
PrimitiveType_DeConv2D
,
schema
::
PrimitiveType_DepthwiseConv2D
,
schema
::
PrimitiveType_DeDepthwiseConv2D
,
schema
::
PrimitiveType_Pooling
,
schema
::
PrimitiveType_Resize
,
schema
::
PrimitiveType_BatchNorm
};
schema
::
PrimitiveType_BatchNorm
,
schema
::
PrimitiveType_FusedBatchNorm
};
static
const
std
::
vector
<
schema
::
PrimitiveType
>
fp32FullOpList
=
{
schema
::
PrimitiveType_Concat
,
schema
::
PrimitiveType_Add
,
...
...
mindspore/lite/tools/common/node_util.h
浏览文件 @
9638139e
...
...
@@ -234,7 +234,7 @@ static STATUS TransFilterData(schema::TensorT *tensor, kTransFilterType type, in
buf
.
get
()
+
((
h
*
filterW
*
filterC
*
filterK
)
+
(
w
*
filterC
*
filterK
)
+
(
c
*
filterK
)
+
(
k
));
}
else
if
(
type
==
kCKHW2KHWC
)
{
p2Buff
=
buf
.
get
()
+
((
k
*
filterH
*
filterW
*
filterC
)
+
(
h
*
filterW
*
filter
K
)
+
(
w
*
filterC
)
+
(
c
));
buf
.
get
()
+
((
k
*
filterH
*
filterW
*
filterC
)
+
(
h
*
filterW
*
filter
C
)
+
(
w
*
filterC
)
+
(
c
));
}
else
{
p2Buff
=
buf
.
get
()
+
((
h
*
filterW
*
filterK
*
filterC
)
+
(
w
*
filterK
*
filterC
)
+
(
k
*
filterC
)
+
(
c
));
...
...
mindspore/lite/tools/converter/legacy_optimizer/node/weight_format_pass.cc
浏览文件 @
9638139e
...
...
@@ -351,7 +351,7 @@ int WeightFormatPass::NonQuantDataFormatTrans(GraphNode *graphNode) {
// todo(00445839): consider varible weight condition
}
}
else
if
(
opType
==
schema
::
PrimitiveType_DepthwiseConv2D
)
{
// weight should be CKHW
if
(
graphNode
->
subGraph
->
fmkType
==
converter
::
FmkType_MS
)
{
if
(
fmkType
==
converter
::
FmkType_MS
)
{
weightTensor
->
format
=
schema
::
Format_CKHW
;
}
if
(
weightTensor
->
format
==
schema
::
Format_CKHW
)
{
// from caffe or onnx or ms
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录