Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MLAir
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
esde
machine-learning
MLAir
Merge requests
!318
Resolve "release v1.4.0"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "release v1.4.0"
release_v1.4.0
into
master
Overview
0
Commits
229
Pipelines
3
Changes
1
Merged
Ghost User
requested to merge
release_v1.4.0
into
master
3 years ago
Overview
0
Commits
229
Pipelines
3
Changes
1
Expand
Closes
#317 (closed)
Edited
3 years ago
by
Ghost User
0
0
Merge request reports
Viewing commit
8b5f1346
Show latest version
1 file
+
5
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
8b5f1346
FCN activation name now works with relu
· 8b5f1346
leufen1
authored
4 years ago
mlair/model_modules/fully_connected_networks.py
+
5
−
3
Options
@@ -88,7 +88,9 @@ class FCN(AbstractModelClass):
# settings
self
.
activation
=
self
.
_set_activation
(
activation
)
self
.
activation_name
=
activation
self
.
activation_output
=
self
.
_set_activation
(
activation_output
)
self
.
activation_output_name
=
activation_output
self
.
optimizer
=
self
.
_set_optimizer
(
optimizer
,
**
kwargs
)
self
.
layer_configuration
=
(
n_layer
,
n_hidden
)
if
layer_configuration
is
None
else
layer_configuration
self
.
_update_model_name
()
@@ -164,7 +166,7 @@ class FCN(AbstractModelClass):
for
layer
in
range
(
n_layer
):
x_in
=
keras
.
layers
.
Dense
(
n_hidden
,
kernel_initializer
=
self
.
kernel_initializer
,
kernel_regularizer
=
self
.
kernel_regularizer
)(
x_in
)
x_in
=
self
.
activation
(
name
=
f
"
{
self
.
activation
.
args
[
0
]
}
_
{
layer
+
1
}
"
)(
x_in
)
x_in
=
self
.
activation
(
name
=
f
"
{
self
.
activation
_name
}
_
{
layer
+
1
}
"
)(
x_in
)
if
self
.
dropout
is
not
None
:
x_in
=
keras
.
layers
.
Dropout
(
self
.
dropout
)(
x_in
)
else
:
@@ -172,11 +174,11 @@ class FCN(AbstractModelClass):
for
layer
,
n_hidden
in
enumerate
(
self
.
layer_configuration
):
x_in
=
keras
.
layers
.
Dense
(
n_hidden
,
kernel_initializer
=
self
.
kernel_initializer
,
kernel_regularizer
=
self
.
kernel_regularizer
)(
x_in
)
x_in
=
self
.
activation
(
name
=
f
"
{
self
.
activation
.
args
[
0
]
}
_
{
layer
+
1
}
"
)(
x_in
)
x_in
=
self
.
activation
(
name
=
f
"
{
self
.
activation
_name
}
_
{
layer
+
1
}
"
)(
x_in
)
if
self
.
dropout
is
not
None
:
x_in
=
keras
.
layers
.
Dropout
(
self
.
dropout
)(
x_in
)
x_in
=
keras
.
layers
.
Dense
(
self
.
_output_shape
)(
x_in
)
out
=
self
.
activation_output
(
name
=
f
"
{
self
.
activation_output
.
args
[
0
]
}
_output
"
)(
x_in
)
out
=
self
.
activation_output
(
name
=
f
"
{
self
.
activation_output
_name
}
_output
"
)(
x_in
)
self
.
model
=
keras
.
Model
(
inputs
=
x_input
,
outputs
=
[
out
])
def
set_compile_options
(
self
):
Loading