I have this question about nn.CTCLoss, I would be grateful if anybody can answer the same.
Example:
loss = nn.CTCLoss() 
label = 'aman' 
label_dict = {<blank>:0, 'a':1, 'm':2, 'n':3}

so should encode the label like this
encoded_label = [1, 2, 1, 3]
or like this
encoded_label = [0, 1, 0, 2, 0, 1, 0, 3, 0]
Note: These  encoded_label  will be passed as  targets  in the  loss  mentioned above.