I think CTC is for such task because I read several reports using CNN+LSTM+CTC to do captcha recognition. But for my model, even without randomly added spaces, CTC doesn’t work. NLLLoss does. Probably there are tricks I don’t know using CTC.
Thanks anyway, I’ll look into capsule nets.