Text generation with an RNN

Hi All,
Inspiring by the tutorial called “Text generation with an RNN” (Text generation with an RNN  |  TensorFlow), I managed to train a model to generate new molecules in SMILES string format. If I generate new molecules one after another, the model works perfectly with > 98% chemically valid new generated molecules. But, when I try to generate a batch molecules (10000 molecules), the validity of newly generated molecules extremely drops to < 70%.
Could someone please help me with this issue?

Thank you,
Jalil.

I don’t know how you have adapted that example. But If you are interested we have some specific tutorials for this type of dataset:

Thank you.
It is working really good but now I am facing a bad problem.
When I save the trained model and load it again, it complains for batch production and gives an error