×

签到

分享到微信

打开微信,使用扫一扫进入页面后,点击右上角菜单,

点击“发送给朋友”或“分享到朋友圈”完成分享

nn_loss无法运行 已完结 kirk2021-08-22 18:51:55 回复 1 查看 技术答疑
nn_loss无法运行
分享到:

[WARNING][/workspace/volume/private/sdk/cambricon_pytorch/pytorch/src/catch/torch_mlu/csrc/aten/operators/op_methods.cpp][line:3076][nll_loss_forward][thread:140283915532032][process:215818]: 

nll_loss_forward Op cannot run on MLU device, start running on CPU!

Traceback (most recent call last):

  File "test.py", line 493, in <module>

    test(start_epoch)

  File "test.py", line 401, in test

    loss = criterion(outputs, targets)

  File "/workspace/volume/private/sdk/venv/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__

    result = self.forward(*input, **kwargs)

  File "/workspace/volume/private/sdk/venv/pytorch/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 916, in forward

    ignore_index=self.ignore_index, reduction=self.reduction)

  File "/workspace/volume/private/sdk/venv/pytorch/lib/python3.7/site-packages/torch/nn/functional.py", line 2009, in cross_entropy

    return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)

  File "/workspace/volume/private/sdk/venv/pytorch/lib/python3.7/site-packages/torch/nn/functional.py", line 1838, in nll_loss

    ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)

RuntimeError: tensor does not have a device


该算子是否不支持?因为是未入门选手,如果需要添加新的算子,是否有详细的手把手教程文档?

版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:京ICP备17003415号-1
关闭