Unverified Commit e0a5725f authored by Adrià Arrufat's avatar Adrià Arrufat Committed by GitHub
Browse files

Handle tag layers as inputs to disable_duplicative_biases (#2416)

parent 5bd837d1
...@@ -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>& )
{ {
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment