Commit b72aeece authored by Chris Jewell's avatar Chris Jewell
Browse files

Make prediction CPU-only

Fixes slow computation due to host/device memory swapping in prediction.
parent ffd59342
......@@ -109,14 +109,15 @@ def predict(
dims=["prediction_time"],
)
estimated_init_state, predicted_events = predicted_incidence(
samples,
initial_state,
covar_data,
initial_step,
num_steps,
out_of_sample,
)
with tf.device("CPU"): # TODO: work out effect GPU solution
estimated_init_state, predicted_events = predicted_incidence(
samples,
initial_state,
covar_data,
initial_step,
num_steps,
out_of_sample,
)
prediction = xarray.DataArray(
predicted_events.numpy(),
......
[tool.poetry]
name = "covid19uk"
version = "0.7.4"
version = "0.7.5"
description = "Spatial stochastic SEIR analysis of COVID-19 in the UK"
authors = ["Chris Jewell <c.jewell@lancaster.ac.uk>"]
license = "MIT"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment