diff --git a/nnlib/device.py b/nnlib/device.py index 306c777..0264842 100644 --- a/nnlib/device.py +++ b/nnlib/device.py @@ -102,7 +102,7 @@ class device: elif device.backend == "tensorflow": for dev in cuda_devices: if dev['total_mem'] >= totalmemsize_gb*1024*1024*1024: - result.append (i) + result.append ( dev['index'] ) return result diff --git a/samplelib/SampleProcessor.py b/samplelib/SampleProcessor.py index eb72c31..3cdad0f 100644 --- a/samplelib/SampleProcessor.py +++ b/samplelib/SampleProcessor.py @@ -260,7 +260,7 @@ class SampleProcessor(object): elif mode_type == SPTF.MODE_G: img = np.concatenate ( (np.expand_dims(cv2.cvtColor(img_bgr, cv2.COLOR_BGR2GRAY),-1),img_mask) , -1 ) elif mode_type == SPTF.MODE_GGG: - img = np.concatenate ( ( np.repeat ( np.expand_dims(cv2.cvtColor(img_bgr, cv2.COLOR_BGR2GRAY),-1), (3,), -1), img_mask), -1) + img = np.repeat ( np.expand_dims(cv2.cvtColor(img_bgr, cv2.COLOR_BGR2GRAY),-1), (3,), -1) elif mode_type == SPTF.MODE_M and is_face_sample: img = img_mask