Hello-Justify / randomQA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random in multiprocessing

When you use numpy.random with torch.utils.data.Dataset, something bad happens.

Prerequisites

  • python
  • numpy
  • torch

Usage

python ori_loader.py

python cur_loader.py 
# equal to 
# python cur_loader.py random

python cur_loader.py numpy

# for train
python cur_loader.py numpy random

# for validation and test, shuffle should be False
python cur_loader.py numpy fix

python cur_loader.py torch

About


Languages

Language:Python 100.0%