License_Plate_Detection_Pytorch icon indicating copy to clipboard operation
License_Plate_Detection_Pytorch copied to clipboard

train

Open ShydowLi opened this issue 5 years ago • 3 comments

您好,我能问个问题吗,在训练数据集的时候,出现下面的情况是什么问题呢? RuntimeError: Expected tensor for argument #2 'targets' to have scalar type Int; but got torch.FloatTensor instead (while checking arguments for ctc_loss_cpu) @xuexingyu24

ShydowLi avatar Nov 04 '19 03:11 ShydowLi

@xuexingyu24 您好,有时间可以解答一下吗?谢谢

ShydowLi avatar Nov 07 '19 03:11 ShydowLi

@ShydowLi @xuexingyu24 how do you solve the problem? please telI me if do, thanks. I try ro operate "labeles = torch.IntTensor(labels)" or "labels = Variable(labels, requires_grad=False).cuda()”, but it does not work and occur new erros.

zhangw864680355 avatar Dec 03 '19 03:12 zhangw864680355

change labels to int will solve the problem. ex. labels = labels.int()

jameschao2000 avatar Dec 05 '19 01:12 jameschao2000