From bbb94c8be4420cddbe2586e29955247194298f81 Mon Sep 17 00:00:00 2001 From: Jeffrey Adrion Date: Wed, 27 May 2020 16:58:17 +0000 Subject: [PATCH] fixed dnn error in predict --- ReLERNN/helpers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ReLERNN/helpers.py b/ReLERNN/helpers.py index 4e409a3..e30cf0e 100644 --- a/ReLERNN/helpers.py +++ b/ReLERNN/helpers.py @@ -265,6 +265,14 @@ def load_and_predictVCF(VCFGenerator, os.environ["CUDA_VISIBLE_DEVICES"] = str(gpuID) + ## The following code block appears necessary for running with tf2 and cudnn + from tensorflow.compat.v1 import ConfigProto + from tensorflow.compat.v1 import Session + config = ConfigProto() + config.gpu_options.allow_growth = True + Session(config=config) + ### + # load json and create model if(network != None): jsonFILE = open(network[0],"r")