Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chris Jewell
covid19uk
Commits
7a9ce79b
Commit
7a9ce79b
authored
Apr 15, 2021
by
Chris Jewell
Browse files
Removed redundant line
parent
876ee171
Changes
1
Hide whitespace changes
Inline
Side-by-side
covid/model_spec.py
View file @
7a9ce79b
...
...
@@ -151,7 +151,6 @@ def CovidUK(covariates, initial_state, initial_step, num_steps):
C
=
tf
.
convert_to_tensor
(
covariates
[
"C"
],
dtype
=
DTYPE
)
C
=
tf
.
linalg
.
set_diag
(
C
,
tf
.
zeros
(
C
.
shape
[
0
],
dtype
=
DTYPE
))
Cstar
=
C
+
tf
.
transpose
(
C
)
Cstar
=
tf
.
linalg
.
set_diag
(
Cstar
,
-
tf
.
reduce_sum
(
C
,
axis
=-
2
))
...
...
@@ -234,7 +233,6 @@ def next_generation_matrix_fn(covar_data, param):
def
fn
(
t
,
state
):
C
=
tf
.
convert_to_tensor
(
covar_data
[
"C"
],
dtype
=
DTYPE
)
C
=
tf
.
linalg
.
set_diag
(
C
,
-
tf
.
reduce_sum
(
C
,
axis
=-
2
))
C
=
tf
.
linalg
.
set_diag
(
C
,
tf
.
zeros
(
C
.
shape
[
0
],
dtype
=
DTYPE
))
Cstar
=
C
+
tf
.
transpose
(
C
)
Cstar
=
tf
.
linalg
.
set_diag
(
Cstar
,
-
tf
.
reduce_sum
(
C
,
axis
=-
2
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment