MemoryAataLayer now correctly consume batch_size elements