Open pj-mathematician opened 1 year ago
Yes, it is quite possibly the reason. I vaguely recall that in the code the attention window slides from left to right. If that's the case then, neural net might look at the least relevant part of a character string when predicting next point.
Have you tried to reverse the order of the text transcript (apple -> elppa) on a level of a dataset? Perhaps you can decorate the dataset class you have like this:
class ReversedTextDataset:
def __init__(self, ds):
self.ds = ds
def __getitem__(self, indx):
handwriting, text = self.ds[indx]
return handwriting, text[::-1]
def __len__(self):
return len(self.ds)
Thank you, this seems promising. I will try it out on my data.
By the way, could you show a couple of typical samples generated by the neural net? It's just that there may be other issues with code besides the neural side (e.g. some rendering bugs).
Yep, try that. It might be the quickest fix.
Can you please suggest the modifications that I should apply, so that I can train the given model for Arabic Handwriting sequences. Arabic text is written from right to left, which might be the reason for which this model isnt yielding correct results. Thanks. Example arabic online handwriting model is ADAB