這個在跑UCF101時候遇到了,其實(shí)報錯寫的很清楚:
libraries/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu:52: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [2,0,0] Assertiont >= 0 && t < n_classesfailed.
這是因?yàn)闃?biāo)簽的索引溢出了,查了一下UCF101的label是從1到101,而索引應(yīng)該是從0到100,所以把label-1就行了,so easy!