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
Meysam Shamsi
s4d
Commits
03d0b79e
Commit
03d0b79e
authored
Aug 17, 2020
by
Anthony Larcher
Browse files
merge
parents
e120ee8a
3cea5427
Changes
3
Hide whitespace changes
Inline
Side-by-side
s4d/clustering/hac_iv.py
View file @
03d0b79e
...
...
@@ -41,7 +41,6 @@ def hac_iv(diar, scores, method="complete", threshold=0.0):
lscores
=
copy
.
deepcopy
(
scores
)
# get the triangular part of the distances
distances
,
t
=
scores2distance
(
lscores
,
threshold
)
# distance = numpy.copy((scores.scoremat + scores.scoremat.T) / 2.0) * -1.0
# numpy.fill_diagonal(distance, numpy.inf)
# min = numpy.min(distance)
...
...
s4d/diar.py
View file @
03d0b79e
...
...
@@ -984,7 +984,7 @@ class Diar():
channel
=
'U'
if
diar
.
_attributes
.
exist
(
'channel'
):
channel
=
segment
[
'channel'
]
if
time_float
:
if
not
time_float
:
lst
.
append
(
'{:s} 1 {:d} {:d} {:s} {:s} {:s} {:s}
\n
'
.
format
(
segment
[
'show'
],
segment
[
'start'
],
segment
[
'stop'
]
-
segment
[
'start'
],
gender
,
channel
,
env
,
segment
[
'cluster'
]))
...
...
s4d/nnet/seqtoseq.py
View file @
03d0b79e
...
...
@@ -61,7 +61,7 @@ def save_checkpoint(state, is_best, filename='checkpoint.pth.tar', best_filename
shutil
.
copyfile
(
filename
,
best_filename
)
class
PreNet
(
nn
.
Module
):
def
__init
(
self
,
def
__init
__
(
self
,
sample_rate
=
16000
,
windows_duration
=
0.2
,
frame_shift
=
0.01
):
...
...
@@ -153,16 +153,11 @@ class SeqToSeq(nn.Module):
linear_1
,
linear_2
,
output_size
=
1
):
"""
:param input_size:
:param lstm_1:
:param lstm_2:
:param linear_1:
:param linear_2:
:param output_size:
"""
super
(
BLSTM
,
self
).
__init__
()
super
(
SeqToSeq
,
self
).
__init__
()
self
.
preprocessor
=
PreNet
(
sample_rate
=
16000
,
windows_duration
=
0.2
,
frame_shift
=
0.01
)
self
.
lstm_1
=
nn
.
LSTM
(
input_size
,
lstm_1
//
2
,
bidirectional
=
True
,
batch_first
=
True
)
self
.
lstm_2
=
nn
.
LSTM
(
lstm_1
,
lstm_2
//
2
,
bidirectional
=
True
,
batch_first
=
True
)
...
...
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