Variable length batch decoding

I have implemented in TF2.0 . I had to make quite a bunch of changes to make it work. Will share it.