Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lp_nn_robustness_verification
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ludwig10_masters_thesis
lp_nn_robustness_verification
Commits
cc1d9c89
Verified
Commit
cc1d9c89
authored
2 years ago
by
Björn Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
fix(pre_processing): replace z_i by theta_i in the calculation of xi_i
parent
5bf81bc9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lp_nn_robustness_verification/pre_processing.py
+9
-9
9 additions, 9 deletions
src/lp_nn_robustness_verification/pre_processing.py
with
9 additions
and
9 deletions
src/lp_nn_robustness_verification/pre_processing.py
+
9
−
9
View file @
cc1d9c89
...
...
@@ -43,7 +43,7 @@ class LinearInclusion:
activation
:
ActivationFunc
nn_params
:
NNParams
z_is
:
IntervalCollection
theta
:
IntervalCollection
theta
_is
:
IntervalCollection
xi_is
:
VectorOfRealVectors
r_is
:
IntervalCollection
...
...
@@ -73,7 +73,7 @@ class LinearInclusion:
def
_compute_z_is_and_theta
(
self
)
->
None
:
r
"""
Compute the :math:`z^{(i)}` and :math:`\Theta^{(i)}, i = 1, \ldots, n^{(i)}`
For details see Equations 3.
7 and
3.
8
of Definition 3.2.1
0
in [Ludwig2023]_.
For details see Equations 3.
10 to
3.
12
of Definition 3.2.1
7
in [Ludwig2023]_.
"""
z_is
=
[]
theta_is
=
[
self
.
uncertain_inputs
.
theta_0
]
...
...
@@ -120,7 +120,7 @@ class LinearInclusion:
self
.
z_is
=
IntervalCollection
(
z_is
,
)
self
.
theta
=
IntervalCollection
(
self
.
theta
_is
=
IntervalCollection
(
theta_is
,
)
...
...
@@ -130,10 +130,10 @@ class LinearInclusion:
For details see Equation 3.9 of Definition 3.2.10 in [Ludwig2023]_.
"""
xi_is
=
[]
for
z
_i
in
self
.
z_is
:
for
theta
_i
in
self
.
theta_is
[
1
:]
:
xi_ks
=
[]
for
z
_k
in
z
_i
:
xi_ks
.
append
(
z
_k
.
midpoint
[
0
].
inf
)
for
theta
_k
in
theta
_i
:
xi_ks
.
append
(
theta
_k
.
midpoint
[
0
].
inf
)
xi_is
.
append
(
np
.
array
(
xi_ks
))
write_current_timing_stats
(
f
"
{
len
(
self
.
uncertain_inputs
.
values
)
}
_inputs_and
"
...
...
@@ -143,9 +143,9 @@ class LinearInclusion:
f
"
xi^(
{
len
(
xi_is
)
}
) computation finished
"
,
"
a
"
,
)
assert
len
(
xi_ks
)
==
len
(
z
_i
),
(
f
"
Somehow there is not one xi_k^(i) for every of the
{
len
(
z
_i
)
}
,
"
f
"
z
_k^(i), but only
{
len
(
xi_ks
)
}
"
assert
len
(
xi_ks
)
==
len
(
theta
_i
),
(
f
"
Somehow there is not one xi_k^(i) for every of the
{
len
(
theta
_i
)
}
,
"
f
"
theta
_k^(i), but only
{
len
(
xi_ks
)
}
"
)
assert
len
(
xi_is
)
==
len
(
self
.
z_is
),
(
f
"
Somehow there is not one xi^(i) for every of the
{
len
(
self
.
z_is
)
}
z^(i),
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment