256 Star 916 Fork 294

MindSpore / docs

There is a bug in the mindspore.nn.ReLU and mindspore.nn.ReLU6 function

Bug-Report
DONE
lvmingfu member  Opened this issue
name about labels
Bug Report Use this template for reporting a bug kind/bug

Environment

  • Hardware Environment(Ascend/GPU/CPU):

Uncomment only one /device <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/device cpu

  • Software Environment:
    -- MindSpore version (source or binary):
    -- Python version (e.g., Python 3.7.5):
    -- OS platform and distribution (e.g., Linux Ubuntu 16.04):
    -- GCC/Compiler version (if compiled from source):

Related testcase

Steps to reproduce the issue

  1. issue source link: https://bbs.huaweicloud.com/forum/thread-85925-1-1.html

Describe the current behavior

import mindspore
from mindspore import Tensor, context
import numpy as np
import mindspore.nn as nn

context.set_context(mode=context.GRAPH_MODE,device_target="CPU")

input_x = Tensor(np.array([-1, 2, -3, 2, -1]), mindspore.float16)
relu = nn.ReLU()
relu(input_x)

error info:

RuntimeError: mindspore\ccsrc\backend\kernel_compiler\cpu\mkldnn\relu_cpu_kernel.cc:28 InitKernel] relu kernel dims invalid 1

if use data [[-1, 2, -3, 2, -1]] instead [-1, 2, -3, 2, -1] it will run success.

Describe the expected behavior

Related log / screenshot

Special notes for this issue

Attachments
5518576 mindspore ci 1587902139 total 3 participants

Comments (2)

5518576 mindspore ci 1587902139
mindspore-ci-bot 2020-11-05 17:57 member

Hey lvmingfu, Welcome to MindSpore Community.
All of the projects in MindSpore Community are maintained by @mindspore-ci-bot .
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/mindspore/community/blob/master/command.md to find the details.

TingWang 2020-11-06 10:55 member

It has been fixed on master.

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs

Search