成功解决RuntimeError: multi-target not supported at /pytorch/aten/src/THCUNN/generic/
计算交叉熵时报错:RuntimeError: multi-target not supported at /pytorch/aten/src/THCUNN/generic/ClassNLLCriterion.cu:15维度不匹配导致input, target的维度与F.cross_entropy()函数要求的维度不匹配解决方法:F.cross_entropy( input, target.sque
·
计算交叉熵时报错:
RuntimeError: multi-target not supported at /pytorch/aten/src/THCUNN/generic/ClassNLLCriterion.cu:15
维度不匹配导致
input, target的维度与F.cross_entropy()函数要求的维度不匹配
解决方法:
F.cross_entropy( input, target.squeeze() )
更多推荐


所有评论(0)