FReeNet icon indicating copy to clipboard operation
FReeNet copied to clipboard

ValueError: Sample larger than population or is negative

Open an-zi-li opened this issue 2 years ago • 0 comments

I had this problem when I was training GAG, does anyone know how to solve it。

Traceback (most recent call last): File "D:\anaconda\envs\torch170\lib\site-packages\torch\utils\data_utils\worker.py", line 198, in _worker_loop data = fetcher.fetch(index) File "D:\anaconda\envs\torch170\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\anaconda\envs\torch170\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\pycharm_workspace\Files\FReeNet\src\data\RaFD90L64Tri_dataset.py", line 113, in getitem B_id = random.sample(diff, 1)[0] File "D:\anaconda\envs\torch170\lib\random.py", line 320, in sample raise ValueError("Sample larger than population or is negative") ValueError: Sample larger than population or is negative

an-zi-li avatar Mar 23 '22 03:03 an-zi-li