Skip to content

Commit a925d48

Browse files
committed
fix error when preprocessing image data
1 parent aaab70b commit a925d48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tutorials/02_captcha_to_text/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def download_and_unzip(url, extract_to='Datasets'):
3434
captcha_path = os.path.join('Datasets', 'captcha_images_v2')
3535
for file in os.listdir(captcha_path):
3636
file_path = os.path.join(captcha_path, file)
37-
file_name = os.path.basename(file)
37+
file_name = os.path.splitext(file)[0]
3838
dataset.append([file_path, file_name])
3939
vocab.update(list(file_name))
4040
max_len = max(max_len, len(file_name))

0 commit comments

Comments
 (0)