mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-07 21:42:08 -07:00
get rid of random module
This commit is contained in:
parent
f63f78e1ab
commit
24dd4ef000
2 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,5 @@
|
|||
import traceback
|
||||
import numpy as np
|
||||
import random
|
||||
import cv2
|
||||
|
||||
from utils import iter_utils
|
||||
|
@ -58,7 +57,8 @@ class SampleGeneratorImageTemporal(SampleGeneratorBase):
|
|||
for n_batch in range(self.batch_size):
|
||||
|
||||
if len(shuffle_idxs) == 0:
|
||||
shuffle_idxs = random.sample( range(samples_sub_len), samples_sub_len )
|
||||
shuffle_idxs = [ *range(samples_sub_len) ]
|
||||
np.random.shuffle (shuffle_idxs)
|
||||
|
||||
idx = shuffle_idxs.pop()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue