mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-07 05:22:06 -07:00
fixed GPU indexing
This commit is contained in:
parent
d2d0dcb5e7
commit
59ad734b6c
1 changed files with 4 additions and 7 deletions
|
@ -157,13 +157,10 @@ NLayerDiscriminator = nnlib.NLayerDiscriminator
|
|||
else:
|
||||
config = tf.ConfigProto()
|
||||
|
||||
#if device_config.force_gpu_idx != -1 and device_config.backend != "tensorflow-generic":
|
||||
# #tensorflow-generic is system with NVIDIA card, but w/o NVSMI
|
||||
# #so dont hide devices and let tensorflow to choose best card
|
||||
# visible_device_list = ''
|
||||
# for idx in device_config.gpu_idxs:
|
||||
# visible_device_list += str(idx) + ','
|
||||
# config.gpu_options.visible_device_list=visible_device_list[:-1]
|
||||
visible_device_list = ''
|
||||
for idx in device_config.gpu_idxs:
|
||||
visible_device_list += str(idx) + ','
|
||||
config.gpu_options.visible_device_list=visible_device_list[:-1]
|
||||
|
||||
config.gpu_options.force_gpu_compatible = True
|
||||
config.gpu_options.allow_growth = device_config.allow_growth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue