Solved by Ahmed_Abdelaziz in post #4 
              
              
                I solved my problem by overriding the create_batches methods inside the data.Iterator. 
class EvalIterator(data.Iterator):
    def create_batches(self):
        self.batches = custom_batch(self.data())


def custom_batch(data):
    """Yield elements from data where each batch represents a sentence."…