!15576 fix newAxisMask making ndim incorrect

From: @zhaozhenlong
Reviewed-by: @zhanghaibo5,@zhang_xue_tong
Signed-off-by: @zhang_xue_tong
This commit is contained in:
mindspore-ci-bot 2021-04-25 09:30:04 +08:00 committed by Gitee
commit e26d3f5a21
1 changed files with 0 additions and 1 deletions

View File

@ -177,7 +177,6 @@ void ApplyNewAxisMask(StridedSliceTransferBuffer *transfer_buffer, StridedSliceP
size_t *out_shape_size) { size_t *out_shape_size) {
for (size_t i = 0; i < transfer_buffer->new_axis_mask_size_; i++) { for (size_t i = 0; i < transfer_buffer->new_axis_mask_size_; i++) {
if (transfer_buffer->new_axis_mask_[i]) { if (transfer_buffer->new_axis_mask_[i]) {
transfer_buffer->ndim_ += 1;
ShapeInsert(in_shape, out_shape_size, i, 1); ShapeInsert(in_shape, out_shape_size, i, 1);
transfer_buffer->begins_[i] = 0; transfer_buffer->begins_[i] = 0;
transfer_buffer->ends_[i] = 1; transfer_buffer->ends_[i] = 1;