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)
예제 #2
0
def batch_genartate(buffer: ptan.experience.ExperienceReplayBuffer, size):
    while True:
        buffer.populate(1)
        yield buffer.sample(size)