From e2bc65d5f0482521ce4afe993c6f1ebcb570c00a Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Fri, 2 Aug 2019 13:40:41 +0100 Subject: [PATCH] Fix issue with RTX GPU and TensorFlow (#322) An issue affecting at least 2070 and 2080 cards (possibly other RTX cards too) requires auto growth to be enabled for TensorFlow to work. I don't know enough about the impact of this change to know whether this ought to be made optional or not, but for RTX owners, this simple change fixes TensorFlow errors when generating models. --- models/ModelBase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/ModelBase.py b/models/ModelBase.py index b823a74..25757b3 100644 --- a/models/ModelBase.py +++ b/models/ModelBase.py @@ -45,7 +45,7 @@ class ModelBase(object): device_args['force_gpu_idx'] = io.input_int("Which GPU idx to choose? ( skip: best GPU ) : ", -1, [ x[0] for x in idxs_names_list] ) self.device_args = device_args - self.device_config = nnlib.DeviceConfig(allow_growth=False, **self.device_args) + self.device_config = nnlib.DeviceConfig(allow_growth=True, **self.device_args) io.log_info ("Loading model...")