Browse Source

!233 Fix bug of formula of coverage metrics

From: @zhidanliu
Reviewed-by: @pkuliuliu,@jxlang910
Signed-off-by: @pkuliuliu,@jxlang910
tags/v1.6.0
mindspore-ci-bot Gitee 4 years ago
parent
commit
15893d4bd8
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      mindarmour/fuzz_testing/model_coverage_metrics.py

+ 3
- 3
mindarmour/fuzz_testing/model_coverage_metrics.py View File

@@ -174,8 +174,8 @@ class ModelCoverageMetrics:

def get_nbc(self):
"""
Get the metric of 'neuron boundary coverage' :math` NBC =(|UpperCornerNeuron|
+ |LowerCornerNeuron|/(2*|N|)`, where :math`|N|` is the number of neurons,
Get the metric of 'neuron boundary coverage' :math:`NBC = (|UpperCornerNeuron|
+ |LowerCornerNeuron|)/(2*|N|)`, where :math`|N|` is the number of neurons,
NBC refers to the proportion of neurons whose neurons output value in
the test dataset exceeds the upper and lower bounds of the corresponding
neurons output value in the training dataset.
@@ -192,7 +192,7 @@ class ModelCoverageMetrics:
def get_snac(self):
"""
Get the metric of 'strong neuron activation coverage'.
:math` SNAC =|UpperCornerNeuron| / |N|`. SNAC refers to the proportion
:math:`SNAC = |UpperCornerNeuron|/|N|`. SNAC refers to the proportion
of neurons whose neurons output value in the test set exceeds the upper
bounds of the corresponding neurons output value in the training set.



Loading…
Cancel
Save