Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Fix #5086. The PyTorch DataLoader class can accepts "None" as prefetch_factor in recent versions (> 2.0). For backward compatibility, it is better to set a default value, specifically 2 as in previous PyTorch versions. Looking at the more recent DataLoader source code, it sets the value 2 if prefetch_factor is found to be None. Pull Request resolved: #5091 Reviewed By: wat3rBro Differential Revision: D50693761 Pulled By: ezyang fbshipit-source-id: 479ec794009be9e95d27c401143a88dcd45a6eff
- Loading branch information