Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Anthony Larcher
evALLIES
Commits
bd58b919
Commit
bd58b919
authored
Aug 31, 2021
by
Anthony Larcher
Browse files
new cross show
parent
724dede4
Changes
1
Hide whitespace changes
Inline
Side-by-side
lium_baseline/cross_show.py
View file @
bd58b919
...
...
@@ -147,7 +147,8 @@ def cross_show(previous_iv,
within_diar
,
th_x
,
lim
,
reference_path
):
reference_path
=
None
,
do_hal
=
False
):
"""
:param previous_iv:
...
...
@@ -157,6 +158,7 @@ def cross_show(previous_iv,
:param th_x:
:param lim:
:param reference_path:
:param do_hal:
:return:
"""
within_iv_backup
=
copy
.
deepcopy
(
within_iv
)
...
...
@@ -204,7 +206,6 @@ def cross_show(previous_iv,
numpy
.
fill_diagonal
(
scores
.
scoremat
,
0.0
)
metadata
=
0
do_hal
=
False
if
do_hal
:
tdict
=
{}
for
i
in
range
(
previous_iv_mean
.
modelset
.
shape
[
0
],
ll_iv_mean
.
modelset
.
shape
[
0
]):
...
...
@@ -288,22 +289,23 @@ def cross_show(previous_iv,
return
new_previous_iv
,
new_previous_diar
,
within_diar
,
metadata
def
allies_cross_show_clustering
(
show_idx
,
model
,
current_diar
,
current_vec
,
th_x
,
lim
):
def
allies_cross_show_clustering
(
show_idx
,
model
,
current_diar
,
current_vec
,
th_x
,
lim
,
reference_path
=
None
,
hal
=
False
):
"""
:param show_idx:
:param model:
:param model_cfg:
:param current_diar:
:param current_vec:
:param th_x:
:param lim:
:param reference_path:
:param hal:
:return:
"""
if
show_idx
==
0
:
model
[
"previous_vec"
]
=
copy
.
deepcopy
(
current_vec
)
model
[
"previous_diar"
]
=
current_diar
metadata
=
0
metadata
=
0
else
:
previous_vec
,
previous_diar
,
current_diar
,
metadata
=
cross_show
(
previous_iv
=
model
[
"previous_vec"
],
...
...
@@ -311,7 +313,9 @@ def allies_cross_show_clustering(show_idx, model, current_diar, current_vec, th_
within_iv
=
current_vec
,
within_diar
=
current_diar
,
th_x
=
th_x
,
lim
=
lim
)
lim
=
lim
,
reference_path
=
reference_path
,
do_hal
=
hal
)
model
[
"previous_vec"
]
=
previous_vec
model
[
"previous_diar"
]
=
previous_diar
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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