activeloopai / activeloopai/deeplake

[BUG] dataloader only return the first element of the sequence

未关闭
#2,043 3 条评论 0 个 reaction 已指派 2 人 已被 @AbhinavTuli 认领 在 GitHub 查看
bug
主要语言
C++
星标
9.2k
派生
722
PR 合并指标
30 天内没有已合并 PR

描述

## 🐛🐛 Bug Report

### ⚗️ Current Behavior
When I build a dataset with a sequence of images (like frames), everything works fine. But if I tranfer it to a pytorch dataloader, the loader can only return the first element of the sequence.

**Input Code**
["Creating Datasets with Sequences" official colab example](https://colab.research.google.com/drive/1HdQNTJhnFGDtv_zlWJ70tq_4l7-ty7jh?usp=sharing)

Append following code to the end:
```python
print(ds[0]["frames"].shape)
print(ds[1]["frames"].shape)
dataloader = ds.pytorch()
data_iter = iter(dataloader)
print(next(data_iter)["frames"].shape)
print(next(data_iter)["frames"].shape)
```
It returns:
```python
(600, 1080, 1920, 3)
(1050, 1080, 1920, 3)
torch.Size([1, 1080, 1920, 3])
torch.Size([1, 1080, 1920, 3])
```
But I hope It returns something like:
```python
(600, 1080, 1920, 3)
(1050, 1080, 1920, 3)
torch.Size([1, 600, 1080, 1920, 3])
torch.Size([1, 1050, 1080, 1920, 3])
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。