xuexingyu24 / License_Plate_Detection_Pytorch

A two stage lightweight and high performance license plate recognition in MTCNN and LPRNet
Other
641 stars 171 forks source link

train #8

Open ShydowLi opened 4 years ago

ShydowLi commented 4 years ago

您好,我能问个问题吗,在训练数据集的时候,出现下面的情况是什么问题呢? 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 commented 4 years ago

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

zhangw864680355 commented 4 years ago

@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.

jameschao2000 commented 4 years ago

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