Fetch the repository succeeded.
name | about | labels |
---|---|---|
Bug Report | Use this template for reporting a bug | kind/bug |
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
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.
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.
Sign in to comment