From 0197814e24bdda922eda7d7704f674cc7045bb45 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Thu, 7 Oct 2021 09:19:21 -0500
Subject: [PATCH] minor

---
 modules/deeplearning/icing_cnn.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/deeplearning/icing_cnn.py b/modules/deeplearning/icing_cnn.py
index 6bc3487c..7977e1ad 100644
--- a/modules/deeplearning/icing_cnn.py
+++ b/modules/deeplearning/icing_cnn.py
@@ -174,6 +174,7 @@ class IcingIntensityNN:
         self.sfc = None
 
         self.in_mem_data_cache = {}
+        self.in_mem_data_cache_test = {}
 
         self.model = None
         self.optimizer = None
@@ -235,7 +236,10 @@ class IcingIntensityNN:
         # Pretty much dead, but left in here for reference (See note above)
         if CACHE_DATA_IN_MEM:
             key = frozenset(idxs)
-            tup = self.in_mem_data_cache.get(key)
+            if is_training:
+                tup = self.in_mem_data_cache.get(key)
+            else:
+                tup = self.in_mem_data_cache_test(key)
             if tup is not None:
                 return tup[0], tup[1]
 
@@ -276,7 +280,10 @@ class IcingIntensityNN:
             label = label.reshape((label.shape[0], 1))
 
         if CACHE_DATA_IN_MEM:
-            self.in_mem_data_cache[key] = (data, label)
+            if is_training:
+                self.in_mem_data_cache[key] = (data, label)
+            else:
+                self.in_mem_data_cache_test[key] = (data, label)
 
         return data, label
 
-- 
GitLab