Fix visitor when tag layer is followed by skip layer (#2662)

pull/2679/head
Adrià Arrufat 2 years ago committed by GitHub
parent 65bce59a15
commit e50987df4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -608,6 +608,15 @@ namespace dlib
// update(i);
}
// Handle the special case when the tag layer is followed by a skip layer
template <unsigned long ID, template <typename> class TAG, typename U, typename E>
void operator()(size_t i, const add_tag_layer<ID, add_skip_layer<TAG, U>, E>&)
{
tagged_layers.push_back(i);
const auto t = tag_id<TAG>::id;
tag_to_layer.at(t) = from;
}
template <template <typename> class TAG, typename U>
void operator()(size_t, const add_skip_layer<TAG, U>&)
{

@ -21,6 +21,7 @@ Non-Backwards Compatible Changes:
Bug fixes:
- Fix saving grayscale WebP images (PR #2591)
- Fix dnn dot visitor when a tag layer is followed by a skip layer (PR #2662)
</current>
<!-- ************************************************************************************** -->

Loading…
Cancel
Save