该仓库已于 2026-05-21 归档。您可以查看文件或克隆它,但不能推送、创建工单或合并请求。
文件
lerobot/lerobot/common/policies/utils.py
2024-04-05 11:47:15 +00:00

11 行
435 B
Python

def populate_queues(queues, batch):
for key in batch:
if len(queues[key]) != queues[key].maxlen:
# initialize by copying the first observation several times until the queue is full
while len(queues[key]) != queues[key].maxlen:
queues[key].append(batch[key])
else:
# add latest observation to the queue
queues[key].append(batch[key])
return queues