hi, thank you for your codes. I am confused by the num_classes,.
+- + () + 10 digit + blank + space
num_classes = 3 + 2 + 10 + 1 + 1
I understand the ctc loss need to add a special ctc_blank, but there is no space in the label ,why there are add two 1 ?
I notice that in the training phase, the code run the below part to generate label
charset = '0123456789+-()'
encode_maps = {}
decode_maps = {}
for i, char in enumerate(charset, 1):
encode_maps[char] = i
decode_maps[i] = char
SPACE_INDEX = 0
SPACE_TOKEN = ''
encode_maps[SPACE_TOKEN] = SPACE_INDEX
decode_maps[SPACE_INDEX] = SPACE_TOKEN
I mean there is no space in you lable, so if remove encode_maps[SPACE_TOKEN] = SPACE_INDEX, does the num_class will not need to add another 1?
hi, thank you for your codes. I am confused by the num_classes,. +- + () + 10 digit + blank + space num_classes = 3 + 2 + 10 + 1 + 1 I understand the ctc loss need to add a special ctc_blank, but there is no space in the label ,why there are add two 1 ? I notice that in the training phase, the code run the below part to generate label charset = '0123456789+-()' encode_maps = {} decode_maps = {} for i, char in enumerate(charset, 1): encode_maps[char] = i decode_maps[i] = char
SPACE_INDEX = 0 SPACE_TOKEN = '' encode_maps[SPACE_TOKEN] = SPACE_INDEX decode_maps[SPACE_INDEX] = SPACE_TOKEN I mean there is no space in you lable, so if remove encode_maps[SPACE_TOKEN] = SPACE_INDEX, does the num_class will not need to add another 1?