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
Lucas Miranda
deepOF
Commits
c1d1d84f
Commit
c1d1d84f
authored
Jul 24, 2020
by
lucas_miranda
Browse files
Implemented 1 cycle learning rate schedule
parent
9f758582
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/model_utils.py
View file @
c1d1d84f
...
...
@@ -335,9 +335,7 @@ class Entropy_regulariser(Layer):
def
call
(
self
,
z
,
**
kwargs
):
entropy
=
K
.
sum
(
tf
.
multiply
(
z
,
tf
.
where
(
~
tf
.
math
.
is_inf
(
K
.
log
(
z
)),
K
.
log
(
z
),
0
)),
axis
=
1
)
entropy
=
K
.
sum
(
tf
.
multiply
(
z
+
1e-5
,
tf
.
math
.
log
(
z
)
+
1e-5
),
axis
=
1
)
# Adds metric that monitors dead neurons in the latent space
self
.
add_metric
(
entropy
,
aggregation
=
"mean"
,
name
=
"-weight_entropy"
)
...
...
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