From c0595442926d2cbc1a0ad046254cd7ac038d4a26 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Wed, 31 Jul 2019 22:44:50 +0100 Subject: [PATCH] Fix issue with RTX GPU and TensorFlow 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...")