Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
deepOF
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
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
Service Desk
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
Lucas Miranda
deepOF
Commits
04541053
Commit
04541053
authored
Sep 17, 2020
by
Lucas Miranda
Browse files
Options
Downloads
Patches
Plain Diff
Reformatted files
parent
1338ba03
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
deepof/hypermodels.py
+2
-2
2 additions, 2 deletions
deepof/hypermodels.py
deepof/model_utils.py
+8
-1
8 additions, 1 deletion
deepof/model_utils.py
deepof/models.py
+1
-1
1 addition, 1 deletion
deepof/models.py
with
11 additions
and
4 deletions
deepof/hypermodels.py
+
2
−
2
View file @
04541053
...
...
@@ -92,7 +92,7 @@ class SEQ_2_SEQ_AE(HyperModel):
ENCODING
,
activation
=
"
relu
"
,
kernel_constraint
=
UnitNorm
(
axis
=
1
),
activity_regularizer
=
U
ncorrelated
F
eatures
C
onstraint
(
3
,
weightage
=
1.0
),
activity_regularizer
=
u
ncorrelated
_f
eatures
_c
onstraint
(
3
,
weightage
=
1.0
),
kernel_initializer
=
Orthogonal
(),
)
...
...
@@ -340,7 +340,7 @@ class SEQ_2_SEQ_GMVAE(HyperModel):
for
k
in
range
(
self
.
number_of_components
)
],
),
activity_regularizer
=
U
ncorrelated
F
eatures
C
onstraint
(
3
,
weightage
=
1.0
),
activity_regularizer
=
u
ncorrelated
_f
eatures
_c
onstraint
(
3
,
weightage
=
1.0
),
)([
z_cat
,
z_gauss
])
if
"
ELBO
"
in
self
.
loss
:
...
...
...
...
This diff is collapsed.
Click to expand it.
deepof/model_utils.py
+
8
−
1
View file @
04541053
...
...
@@ -172,7 +172,14 @@ class one_cycle_scheduler(tf.keras.callbacks.Callback):
K
.
set_value
(
self
.
model
.
optimizer
.
lr
,
rate
)
class
UncorrelatedFeaturesConstraint
(
Constraint
):
class
uncorrelated_features_constraint
(
Constraint
):
"""
Tensorflow Constraint subclass that forces a layer to have uncorrelated features.
Useful, among others, for auto encoder bottleneck layers
"""
def
__init__
(
self
,
encoding_dim
,
weightage
=
1.0
):
self
.
encoding_dim
=
encoding_dim
self
.
weightage
=
weightage
...
...
...
...
This diff is collapsed.
Click to expand it.
deepof/models.py
+
1
−
1
View file @
04541053
...
...
@@ -92,7 +92,7 @@ class SEQ_2_SEQ_AE:
self
.
ENCODING
,
activation
=
"
elu
"
,
kernel_constraint
=
UnitNorm
(
axis
=
1
),
activity_regularizer
=
U
ncorrelated
F
eatures
C
onstraint
(
2
,
weightage
=
1.0
),
activity_regularizer
=
u
ncorrelated
_f
eatures
_c
onstraint
(
2
,
weightage
=
1.0
),
kernel_initializer
=
Orthogonal
(),
)
...
...
...
...
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
sign in
to comment