LPRNet_Pytorch
LPRNet_Pytorch copied to clipboard
修改--test_img_dirs后除了94x24大小的图片都会报错
除了94x24大小的所有图片都会报这个错,出什么问题了?
Traceback (most recent call last): File "test_LPRNet.py", line 176, in
test() File "test_LPRNet.py", line 74, in test Greedy_Decode_Eval(lprnet, test_dataset, args) File "test_LPRNet.py", line 105, in Greedy_Decode_Eval prebs = Net(images) File "/home/wang/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call result = self.forward(*input, **kwargs) File "/home/wang/LPRNet_Pytorch/model/LPRNet.py", line 76, in forward x = torch.cat(global_context, 1) RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 124 and 28 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:7
LPRNet本来就是设计输入大小为94x24的,所以你修改了输入大小后当然会报错了!
You can zoom image to "94*24" size.