Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ienco Dino
AZZA
Commits
0b9447b3
Commit
0b9447b3
authored
Dec 09, 2020
by
Ienco Dino
Browse files
Update TwoBranchCNN1D.py
parent
4ee2ec1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
TwoBranchCNN1D.py
View file @
0b9447b3
...
...
@@ -39,15 +39,15 @@ def getBranch(input_layer, n_filters, dropOut, suffix):
def
build_model
(
self
,
input_shape1
,
input_shape2
,
nb_classes
):
def
build_model
(
input_shape1
,
input_shape2
,
nb_classes
):
n_feature_maps
=
128
dropOut
=
0.2
input_layer1
=
tfk
.
layers
.
Input
(
name
=
"input1"
,
shape
=
input_shape1
)
input_layer2
=
tfk
.
layers
.
Input
(
name
=
"input2"
,
shape
=
input_shape2
)
features1
=
self
.
getBranch
(
input_layer1
,
n_feature_maps
,
dropOut
,
"input1"
)
features2
=
self
.
getBranch
(
input_layer2
,
n_feature_maps
,
dropOut
,
"input2"
)
features1
=
getBranch
(
input_layer1
,
n_feature_maps
,
dropOut
,
"input1"
)
features2
=
getBranch
(
input_layer2
,
n_feature_maps
,
dropOut
,
"input2"
)
features
=
tfk
.
Concatenation
(
name
=
"concat_layer"
)([
features1
,
features2
])
dense_layer
=
tfk
.
layers
.
Dense
(
512
,
activation
=
'relu'
)(
features
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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