-
Notifications
You must be signed in to change notification settings - Fork 24.1k
SubsetSampler not available. #1337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
you dont need a separate SubsetSampler, just giving an interable of subset indices is sufficient. |
I am sorry but I don't understand it exactly. To what should we give an iterator of subset indices? |
You are wondering if we can just have a To the sampler, you will give a subset of indices (say a list of indices) and it will sample from them. |
Ohh okay. Sorry I didn't realize that. Thanks for helping out. |
@soumith This doesn't seem to be true either in either pytorch 0.4.1 or 1.3.1. In both cases the following code gives an error.
which results in
|
This is true for 1.5.0 too, it seems like |
@josh-gleason @javierbg this is being relaxed in #38403 |
Summary: Since the check was added in #6249, one can not pass an iterable as a sampler to the data loader anymore, which was a very handy feature (e.g., #1337). I think the check should be removed for two-fold reasons: 1. It is too strict. There is no reason that it should not be a general iterable. 2. It is inconsistent. In `DataLoader` (the main place where people use samplers), you can pass a general iterable as `batch_sampler` but not `sampler` due to this check. Pull Request resolved: #38403 Differential Revision: D21555958 Pulled By: soumith fbshipit-source-id: c7267bb99a31edd8f2750689205d6edc5dab5cff
... and reuse in lower_allocation pass.
Take-over of pytorch#1097 * Add fast CUDA focal loss implementation. * Enable fast math for CUDA focal loss. * Correct typo. * replace deprecated macros * Add fast CUDA focal loss implementation. * Enable fast math for CUDA focal loss. * Correct typo. * replace deprecated macros * TORCH_CUDA_CHECK -> AT_CUDA_CHECK The former is defined in torch/csrc/profiler/cuda.cpp so it's not available usually. The latter however is defined in ATen/cuda/Exceptions.h as an alias of C10_CUDA_CHECK. * add test * clean up * guard for torchvision Co-authored-by: Wil Kong <alpha0422@gmail.com>
Signed-off-by: Wang, Yanyao <yanyao.wang@amd.com> Co-authored-by: Wang, Yanyao <yanyao.wang@amd.com>
…1337) * Add insert_dummy_dep_per_dword over-loading for length 64 * Fix insert_dummy_dep_per_dword and remove over-loading for length 64 * Remove blank lines --------- Co-authored-by: Po Yen Chen <PoYen.Chen@amd.com>
In
torch.utils.data.sampler
there isRandomSampler
andSubsetRandomSampler
but notSubsetSampler
in cases you don't want random sampling from the indices. Any reasons for this? If it is just a missing feature, I can send a PR.The text was updated successfully, but these errors were encountered: