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
OpenDAS
dlib
Commits
e0a5725f
"tests/vscode:/vscode.git/clone" did not exist on "cf9ba90fd47471b56efaa66128de78667b6f17b9"
Unverified
Commit
e0a5725f
authored
Aug 19, 2021
by
Adrià Arrufat
Committed by
GitHub
Aug 19, 2021
Browse files
Handle tag layers as inputs to disable_duplicative_biases (#2416)
parent
5bd837d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
dlib/dnn/layers.h
dlib/dnn/layers.h
+15
-4
No files found.
dlib/dnn/layers.h
View file @
e0a5725f
...
@@ -1757,13 +1757,24 @@ namespace dlib
...
@@ -1757,13 +1757,24 @@ namespace dlib
}
}
// handle input repeat layer with tag case
// handle input repeat layer with tag case
template
<
layer_mode
mode
,
unsigned
long
ID
,
typename
E
,
typename
F
>
template
<
layer_mode
mode
,
unsigned
long
ID
,
typename
E
>
void
disable_input_bias
(
add_layer
<
bn_
<
mode
>
,
add_tag_layer
<
ID
,
impl
::
repeat_input_layer
,
E
>
,
F
>
&
)
void
disable_input_bias
(
add_layer
<
bn_
<
mode
>
,
add_tag_layer
<
ID
,
impl
::
repeat_input_layer
>
,
E
>&
)
{
{
}
}
template
<
unsigned
long
ID
,
typename
E
,
typename
F
>
template
<
unsigned
long
ID
,
typename
E
>
void
disable_input_bias
(
add_layer
<
layer_norm_
,
add_tag_layer
<
ID
,
impl
::
repeat_input_layer
,
E
>
,
F
>&
)
void
disable_input_bias
(
add_layer
<
layer_norm_
,
add_tag_layer
<
ID
,
impl
::
repeat_input_layer
>
,
E
>&
)
{
}
// handle tag layer case
template
<
layer_mode
mode
,
unsigned
long
ID
,
typename
U
,
typename
E
>
void
disable_input_bias
(
add_layer
<
bn_
<
mode
>
,
add_tag_layer
<
ID
,
U
>
,
E
>&
)
{
}
template
<
unsigned
long
ID
,
typename
U
,
typename
E
>
void
disable_input_bias
(
add_layer
<
layer_norm_
,
add_tag_layer
<
ID
,
U
>
,
E
>&
)
{
{
}
}
...
...
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