Closed jonathan-owens closed 4 years ago
Move from using a lambda in transforms.Compose to using transforms.Lambda, so that the transforms list can be pickled on Windows and used with multiple DataLoader workers.
list
DataLoader
This alleviates errors of this nature:
C:/w/1/s/tmp_conda_3.7_055457/conda/conda-bld/pytorch_1565416617654/work/aten/src/THC/THCTensorScatterGather.cu:100: block: [8,0,0], thread: [447,0,0] AssertionindexValue >= 0 && indexValue < src.sizes[dim]failed.
C:/w/1/s/tmp_conda_3.7_055457/conda/conda-bld/pytorch_1565416617654/work/aten/src/THC/THCTensorScatterGather.cu:100: block: [8,0,0], thread: [447,0,0] Assertion
failed.
See problem discussion here and see here for discussion of the implemented solution.
Hi @jonathan-owens,
Thanks for the PR. Everything works as expected on my side so happy to merge :thumbsup:
Move from using a lambda in transforms.Compose to using transforms.Lambda, so that the transforms
list
can be pickled on Windows and used with multipleDataLoader
workers.This alleviates errors of this nature:
C:/w/1/s/tmp_conda_3.7_055457/conda/conda-bld/pytorch_1565416617654/work/aten/src/THC/THCTensorScatterGather.cu:100: block: [8,0,0], thread: [447,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed.
See problem discussion here and see here for discussion of the implemented solution.