Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.em
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
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
bob
bob.learn.em
Merge requests
!60
Port of I-Vector to python
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Port of I-Vector to python
ivector
into
master
Overview
0
Commits
18
Pipelines
22
Changes
2
Merged
Yannick DAYER
requested to merge
ivector
into
master
2 years ago
Overview
0
Commits
18
Pipelines
22
Changes
2
Expand
Adding back our e-m I-Vector implementation.
Edited
2 years ago
by
Yannick DAYER
0
0
Merge request reports
Viewing commit
0f4c5437
Prev
Next
Show latest version
2 files
+
24
−
27
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
0f4c5437
Fix I-Vector crashing at mstep with many chunks.
· 0f4c5437
Yannick DAYER
authored
2 years ago
bob/learn/em/test/test_ivector.py
+
3
−
4
Options
@@ -130,11 +130,10 @@ def test_ivector_machine_training():
test_data
.
sum_px
=
np
.
array
([[
8
,
0
,
4
],
[
6
,
6
,
6
]])
test_data
.
sum_pxx
=
np
.
array
([[
10
,
20
,
30
],
[
60
,
70
,
80
]])
projected
=
machine
.
project
(
test_data
)
print
([
f
"
{
p
:
.
8
f
}
"
for
p
in
projected
])
proj_reference
=
np
.
array
([
0.94234370
,
-
0.61558459
])
np
.
testing
.
assert_almost_equal
(
projected
,
proj_reference
,
decimal
=
7
)
np
.
testing
.
assert_almost_equal
(
projected
,
proj_reference
,
decimal
=
4
)
def
_load_references_from_file
(
filename
):
@@ -202,7 +201,7 @@ def test_trainer_nosigma():
)
# M-Step
m_step
(
m
,
[
stats
]
)
m_step
(
m
,
stats
)
np
.
testing
.
assert_almost_equal
(
references
[
it
][
"
T
"
],
m
.
T
,
decimal
=
5
)
np
.
testing
.
assert_equal
(
init_sigma
,
m
.
sigma
@@ -260,7 +259,7 @@ def test_trainer_update_sigma():
)
# M-Step
m_step
(
m
,
[
stats
]
)
m_step
(
m
,
stats
)
np
.
testing
.
assert_almost_equal
(
references
[
it
][
"
T
"
],
m
.
T
,
decimal
=
5
)
np
.
testing
.
assert_almost_equal
(
references
[
it
][
"
sigma
"
],
m
.
sigma
,
decimal
=
5
Loading