def batch_generator(buffer: ptan.experience.ExperienceReplayBuffer, initial: int, batch_size: int): buffer.populate(initial) while True: buffer.populate(1) yield buffer.sample(batch_size)
def batch_genartate(buffer: ptan.experience.ExperienceReplayBuffer, size): while True: buffer.populate(1) yield buffer.sample(size)