Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nonnegative Factorization
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MARMORET Axel
Nonnegative Factorization
Commits
418f7140
Commit
418f7140
authored
1 year ago
by
MARMORET Axel
Browse files
Options
Downloads
Patches
Plain Diff
Adding a small parameter to the divide in deep mu to avoid numerical instability.
parent
219efbe4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
nn_fac/update_rules/deep_mu.py
+2
-1
2 additions, 1 deletion
nn_fac/update_rules/deep_mu.py
with
2 additions
and
1 deletion
nn_fac/update_rules/deep_mu.py
+
2
−
1
View file @
418f7140
...
...
@@ -7,7 +7,8 @@ def deep_KL_mu(W_Lm1, W_L, H_L, WH_Lp1, lambda_):
ONES
=
np
.
ones_like
(
W_Lm1
)
a
=
ONES
@
H_L
.
T
-
lambda_
*
np
.
log
(
WH_Lp1
)
b
=
W_L
*
((
W_Lm1
/
(
W_L
@
H_L
))
@
H_L
.
T
)
W_L
=
np
.
maximum
(
eps
,
(
1
/
lambda_
*
b
)
/
(
lambertw
(
b
*
np
.
exp
(
a
/
lambda_
)
/
lambda_
,
k
=
0
).
real
))
lambert
=
lambertw
(
b
*
np
.
exp
(
a
/
lambda_
)
/
lambda_
,
k
=
0
).
real
W_L
=
np
.
maximum
(
eps
,
(
1
/
lambda_
*
b
)
/
(
lambert
+
eps
))
return
W_L
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment