try to avoid possible memory leaks

This commit is contained in:
robcaulk 2022-12-07 20:08:31 +01:00
parent b438cd4b3f
commit 71c6ff18c4
2 changed files with 3 additions and 2 deletions

View File

@ -252,9 +252,9 @@ The `CNNPredictionModel` is a non-linear regression based on `Tensorflow` which
"batch_size": 64,
"epochs": 10,
"verbose": "auto",
"shuffle": false
"shuffle": false,
"workers": 1,
"use_multiprocessing": False
"use_multiprocessing": false
}
```

View File

@ -133,6 +133,7 @@ class CNNPredictionModel(BaseTensorFlowModel):
else:
data = dk.data_dictionary["prediction_features"]
data = tf.expand_dims(data, axis=0)
data = tf.convert_to_tensor(data)
predictions = self.model(data, training=False)
predictions = predictions[:, 0, 0]