deep-anpr icon indicating copy to clipboard operation
deep-anpr copied to clipboard

train.py run error ! need help!

Open Mr-Yellow opened this issue 8 years ago • 3 comments
trafficstars

I run this program on windows using python3.5 .It occur following error ,how can I deal with it?Please! Traceback (most recent call last): File "train.py", line 293, in initial_weights=initial_weights) File "train.py", line 259, in train test_xs, test_ys = unzip(list(read_data("test/*.png"))[:50]) File "train.py", line 70, in read_data yield im, code_to_vec(p, code) File "train.py", line 58, in code_to_vec c = numpy.vstack([char_to_vec(c) for c in code]) File "train.py", line 58, in c = numpy.vstack([char_to_vec(c) for c in code]) File "train.py", line 55, in char_to_vec y[common.CHARS.index(c)] = 1.0 ValueError: substring not found

Mr-Yellow avatar Oct 21 '17 23:10 Mr-Yellow

Does your problem have been solved? I also encountered the same problem and asked for answers. Thank you very much!

wenting521 avatar May 07 '18 07:05 wenting521

For me, win10 python3.5

In read_data()

code = fname.split("")[1][9:16] => code = fname.split("\")[1][9:16]

p = fname.split("")[1][17] == '1' => p = fname.split("\")[1][17] == '1'

ZhimingHsu avatar Jul 16 '18 12:07 ZhimingHsu

Simple change In read_data() to:===>

code = fname.split("\")[1][9:16] p = fname.split("\")[1][17] == '1'

harshavkumar avatar Dec 10 '19 09:12 harshavkumar