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

This commit is contained in:
Adrià Arrufat 2022-09-06 05:00:46 +09:00 committed by GitHub
parent 65bce59a15
commit e50987df4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -608,6 +608,15 @@ namespace dlib
// update(i); // 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> template <template <typename> class TAG, typename U>
void operator()(size_t, const add_skip_layer<TAG, U>&) void operator()(size_t, const add_skip_layer<TAG, U>&)
{ {

View File

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