CNN算法在GPU中并行处理时的误差 >让我们使用1个GPU!五个时代的培训 >/opt/conda/conda bld/pytorch_1579040055865/work/aten/src/THCUNN/ClassNLLCriterion.cu:106: >void cunn\u classnlcriterion\u updateOutput\u内核(Dtype*,Dtype*, >Dtype*,long*,Dtype*,int,int,int,int,long)[带Dtype= >float,Acctype=float]:块:[0,0,0],线程:[18,0,0]断言`t >>=0&&t行=110错误=59:设备端断言触发的回溯(most) >最近通话(最后):文件“CNN\u hair\u prediction.py”,第321行,在 > >(train_model,loss_tr)=train()文件“CNN_hair_prediction.py”,第237行,在train中 >loss=标准(输出、标签)文件“/home/jain.he/.conda/envs/py37/lib/python3.7/site packages/torch/nn/modules/module.py”, >第532行,输入呼叫__ >结果=self.forward(*输入,**kwargs)文件“/home/jain.he/.conda/envs/py37/lib/python3.7/site packages/torch/nn/modules/loss.py”, >第916行,向前 >ignore_index=self.ignore_index,reduce=self.reduce)文件“/home/jain.he/.conda/envs/py37/lib/python3.7/site packages/torch/nn/functional.py”, >第2021行,交叉熵 >返回nll_损失(log_softmax(输入,1)、目标、权重、无、忽略索引、无、减少)文件 >“/home/jain.he/.conda/envs/py37/lib/python3.7/site packages/torch/nn/functional.py”, >第1838行,在nll_损失中 >ret=torch.\u C.\u nn.nll\u损失(输入、目标、重量、减少量、获取枚举(减少量)、忽略索引)

CNN算法在GPU中并行处理时的误差 >让我们使用1个GPU!五个时代的培训 >/opt/conda/conda bld/pytorch_1579040055865/work/aten/src/THCUNN/ClassNLLCriterion.cu:106: >void cunn\u classnlcriterion\u updateOutput\u内核(Dtype*,Dtype*, >Dtype*,long*,Dtype*,int,int,int,int,long)[带Dtype= >float,Acctype=float]:块:[0,0,0],线程:[18,0,0]断言`t >>=0&&t行=110错误=59:设备端断言触发的回溯(most) >最近通话(最后):文件“CNN\u hair\u prediction.py”,第321行,在 > >(train_model,loss_tr)=train()文件“CNN_hair_prediction.py”,第237行,在train中 >loss=标准(输出、标签)文件“/home/jain.he/.conda/envs/py37/lib/python3.7/site packages/torch/nn/modules/module.py”, >第532行,输入呼叫__ >结果=self.forward(*输入,**kwargs)文件“/home/jain.he/.conda/envs/py37/lib/python3.7/site packages/torch/nn/modules/loss.py”, >第916行,向前 >ignore_index=self.ignore_index,reduce=self.reduce)文件“/home/jain.he/.conda/envs/py37/lib/python3.7/site packages/torch/nn/functional.py”, >第2021行,交叉熵 >返回nll_损失(log_softmax(输入,1)、目标、权重、无、忽略索引、无、减少)文件 >“/home/jain.he/.conda/envs/py37/lib/python3.7/site packages/torch/nn/functional.py”, >第1838行,在nll_损失中 >ret=torch.\u C.\u nn.nll\u损失(输入、目标、重量、减少量、获取枚举(减少量)、忽略索引),python,algorithm,parallel-processing,conv-neural-network,torch,Python,Algorithm,Parallel Processing,Conv Neural Network,Torch,运行时错误:cuda运行时错误(59):设备端断言在 >/opt/conda/conda bld/pytorch_1579040055865/work/aten/src/THCUNN/generic/ClassNLLCriterion.cu:110 我在运行用于CNN_hair_预测的Python脚本时遇到了上述错误,并尝试了不同的解决方案来解决这个问题,但没有任何结果 有人能帮我解决这个问题吗 > Let's use 1 GPUs! Training for 5 epochs >

运行时错误:cuda运行时错误(59):设备端断言在 >/opt/conda/conda bld/pytorch_1579040055865/work/aten/src/THCUNN/generic/ClassNLLCriterion.cu:110

我在运行用于CNN_hair_预测的Python脚本时遇到了上述错误,并尝试了不同的解决方案来解决这个问题,但没有任何结果

有人能帮我解决这个问题吗

> Let's use 1 GPUs! Training for 5 epochs
> /opt/conda/conda-bld/pytorch_1579040055865/work/aten/src/THCUNN/ClassNLLCriterion.cu:106:
> void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *,
> Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype =
> float, Acctype = float]: block: [0,0,0], thread: [18,0,0] Assertion `t
> >= 0 && t < n_classes` failed. THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1579040055865/work/aten/src/THCUNN/generic/ClassNLLCriterion.cu
> line=110 error=59 : device-side assert triggered Traceback (most
> recent call last):   File "CNN_hair_prediction.py", line 321, in
> <module>
>     (train_model,loss_tr)=train()   File "CNN_hair_prediction.py", line 237, in train
>     loss = criterion(output, labels)   File "/home/jain.he/.conda/envs/py37/lib/python3.7/site-packages/torch/nn/modules/module.py",
> line 532, in __call__
>     result = self.forward(*input, **kwargs)   File "/home/jain.he/.conda/envs/py37/lib/python3.7/site-packages/torch/nn/modules/loss.py",
> line 916, in forward
>     ignore_index=self.ignore_index, reduction=self.reduction)   File "/home/jain.he/.conda/envs/py37/lib/python3.7/site-packages/torch/nn/functional.py",
> line 2021, in cross_entropy
>     return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)   File
> "/home/jain.he/.conda/envs/py37/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)