Преглед изворни кода

setting default shared memory size. otherwise there may be some issues pre-computing it from the first batch

Dimitri Korsch пре 5 година
родитељ
комит
1987c10512
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      cvdatasets/utils/dataset.py

+ 2 - 1
cvdatasets/utils/dataset.py

@@ -9,7 +9,8 @@ def new_iterator(data, n_jobs, batch_size, repeat=True, shuffle=True, n_prefetch
 			n_processes=n_jobs,
 			n_prefetch=n_prefetch,
 			batch_size=batch_size,
-			repeat=repeat, shuffle=shuffle)
+			repeat=repeat, shuffle=shuffle,
+			shared_mem=np.zeros((3,1024,1024), dtype=np.float32).nbytes)
 	else:
 		it = SerialIterator(data,
 			batch_size=batch_size,