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
bob
bob.pad.base
Commits
5222c861
Commit
5222c861
authored
May 29, 2018
by
Amir MOHAMMADI
Browse files
Fix score generation command
parent
8136e03a
Pipeline
#20594
passed with stage
in 14 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/script/vuln_commands.py
View file @
5222c861
...
...
@@ -74,8 +74,8 @@ def write_scores_to_file(neg, pos, filename, attack=False):
@
click
.
command
()
@
click
.
argument
(
'outdir'
)
@
click
.
option
(
'--mean-gen'
,
default
=
10
,
type
=
FLOAT
,
show_default
=
True
)
@
click
.
option
(
'--mean-zei'
,
default
=
0
,
type
=
FLOAT
,
show_default
=
True
)
@
click
.
option
(
'--mean-gen'
,
default
=
7
,
type
=
FLOAT
,
show_default
=
True
)
@
click
.
option
(
'--mean-zei'
,
default
=
3
,
type
=
FLOAT
,
show_default
=
True
)
@
click
.
option
(
'--mean-pa'
,
default
=
5
,
type
=
FLOAT
,
show_default
=
True
)
@
verbosity_option
()
def
gen
(
outdir
,
mean_gen
,
mean_zei
,
mean_pa
):
...
...
@@ -93,14 +93,14 @@ def gen(outdir, mean_gen, mean_zei, mean_pa):
mean_gen
,
mean_zei
,
mean_pa
)
# Write the data into files
write_scores_to_file
(
genuine_dev
,
zei
_dev
,
write_scores_to_file
(
zei_dev
,
genuine
_dev
,
os
.
path
.
join
(
outdir
,
'licit'
,
'scores-dev'
))
write_scores_to_file
(
genuine_eval
,
zei
_eval
,
write_scores_to_file
(
zei_eval
,
genuine
_eval
,
os
.
path
.
join
(
outdir
,
'licit'
,
'scores-eval'
))
write_scores_to_file
(
genuine_dev
,
pa_dev
,
write_scores_to_file
(
pa_dev
,
genuine_dev
,
os
.
path
.
join
(
outdir
,
'spoof'
,
'scores-dev'
),
attack
=
True
)
write_scores_to_file
(
genuine_eval
,
pa
_eval
,
write_scores_to_file
(
pa_eval
,
genuine
_eval
,
os
.
path
.
join
(
outdir
,
'spoof'
,
'scores-eval'
),
attack
=
True
)
...
...
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