Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KerasROOTClassification
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
Container Registry
Model registry
Operate
Environments
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
Eric.Schanet
KerasROOTClassification
Commits
7c1e95cb
Commit
7c1e95cb
authored
6 years ago
by
Nikolai Hartmann
Browse files
Options
Downloads
Patches
Plain Diff
name target layers in adversarial setup
parent
34783571
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
toolkit.py
+3
-3
3 additions, 3 deletions
toolkit.py
with
3 additions
and
3 deletions
toolkit.py
+
3
−
3
View file @
7c1e95cb
...
@@ -2107,7 +2107,7 @@ class ClassificationProjectDecorr(ClassificationProject):
...
@@ -2107,7 +2107,7 @@ class ClassificationProjectDecorr(ClassificationProject):
)
)
if
(
dropout_fraction
is
not
None
)
and
(
dropout_fraction
>
0
):
if
(
dropout_fraction
is
not
None
)
and
(
dropout_fraction
>
0
):
layers
.
append
(
Dropout
(
rate
=
dropout_fraction
))
layers
.
append
(
Dropout
(
rate
=
dropout_fraction
))
layers
.
append
(
Dense
(
1
,
activation
=
self
.
activation_function_output
))
layers
.
append
(
Dense
(
1
,
activation
=
self
.
activation_function_output
,
name
=
"
class
"
))
return
self
.
_class_layers
return
self
.
_class_layers
...
@@ -2120,8 +2120,8 @@ class ClassificationProjectDecorr(ClassificationProject):
...
@@ -2120,8 +2120,8 @@ class ClassificationProjectDecorr(ClassificationProject):
self
.
_adv_hidden_layers
=
[]
self
.
_adv_hidden_layers
=
[]
self
.
_adv_target_layers
=
[]
self
.
_adv_target_layers
=
[]
self
.
_adv_hidden_layers
.
append
(
Dense
(
128
,
activation
=
"
tanh
"
))
self
.
_adv_hidden_layers
.
append
(
Dense
(
128
,
activation
=
"
tanh
"
))
for
binning
in
self
.
decorr_binnings
:
for
binning
,
field_name
in
zip
(
self
.
decorr_binnings
,
self
.
target_fields
)
:
layer
=
Dense
(
len
(
binning
),
activation
=
"
softmax
"
)
layer
=
Dense
(
len
(
binning
),
activation
=
"
softmax
"
,
name
=
"
adv_
"
+
field_name
)
self
.
_adv_target_layers
.
append
(
layer
)
self
.
_adv_target_layers
.
append
(
layer
)
return
self
.
_adv_hidden_layers
+
self
.
_adv_target_layers
return
self
.
_adv_hidden_layers
+
self
.
_adv_target_layers
...
...
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