Skip to content

Conversation

BBuf
Copy link
Contributor

@BBuf BBuf commented Apr 15, 2022

/home/zhangxiaoyu/oneflow/python/oneflow/init.py
/home/zhangxiaoyu/.local/lib/python3.8/site-packages/flowvision/transforms/transforms.py:745: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
warnings.warn(
/home/zhangxiaoyu/.local/lib/python3.8/site-packages/torch/init.py
OneFlow swin dataloader time: 0.005s (= 0.918s / 200, num_workers=2)
PyTorch swin dataloader time: 0.003s (= 0.539s / 200, num_workers=2)
Relative speed: 0.587 (= 0.003s / 0.005s)

@BBuf BBuf requested a review from daquexian April 15, 2022 06:26
from flowvision import datasets, transforms
from flowvision.data import create_transform

class SubsetRandomSampler(flow.utils.data.Sampler):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是可以去掉,在创建 DataLoader 的时候指定 shuffle=True 就可以了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

@daquexian daquexian merged commit 38e47c5 into main Apr 16, 2022
@daquexian daquexian deleted the fix_swin_dataloader_import_bug branch April 16, 2022 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants