This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
zzy34407230
/
mindspore2022
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
22
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
!15648
[GraphKernel] negative axis in Squeeze expander.
From:
@chenlei_autodiff
Reviewed-by: @gaoxiong1,@anyrenwei Signed-off-by:
@anyrenwei
tags/v1.3.0
mindspore-ci-bot
Gitee
5 years ago
parent
2b349dbf53
b419f60b0d
commit
168c64b60d
1 changed files
with
2 additions
and
4 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-4
mindspore/_extends/graph_kernel/expanders/squeeze.py
+ 2
- 4
mindspore/_extends/graph_kernel/expanders/squeeze.py
View File
@@ -34,10 +34,8 @@ class Squeeze(Expander):
if not axis:
out_shape = [d for d in shape if d != 1]
else:
out_shape = []
for idx, dim in enumerate(shape):
if idx not in axis:
out_shape.append(dim)
ndim = len(shape)
out_shape = [shape[i] for i in range(ndim) if not (i in axis or (i - ndim) in axis)]
if not out_shape:
out_shape = [1]
return out_shape
Write
Preview
Loading…
Cancel
Save