From 8b762108650c2f33c2fc750f351caae20564f4ee Mon Sep 17 00:00:00 2001
From: Tim O'Donnell <timodonnell@gmail.com>
Date: Mon, 10 Jun 2019 09:34:09 -0400
Subject: [PATCH] fix

---
 mhcflurry/train_pan_allele_models_command.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mhcflurry/train_pan_allele_models_command.py b/mhcflurry/train_pan_allele_models_command.py
index fa530d15..2c16f263 100644
--- a/mhcflurry/train_pan_allele_models_command.py
+++ b/mhcflurry/train_pan_allele_models_command.py
@@ -416,6 +416,9 @@ def train_model(
         predictor,
         save_to):
 
+    import keras.backend as K
+    K.clear_session()
+
     df = GLOBAL_DATA["train_data"]
     folds_df = GLOBAL_DATA["folds_df"]
     allele_encoding = GLOBAL_DATA["allele_encoding"]
-- 
GitLab