diff --git a/dlib/dnn/visitors.h b/dlib/dnn/visitors.h index bd0c75efc..a8003cc6e 100644 --- a/dlib/dnn/visitors.h +++ b/dlib/dnn/visitors.h @@ -608,6 +608,15 @@ namespace dlib // update(i); } + // Handle the special case when the tag layer is followed by a skip layer + template class TAG, typename U, typename E> + void operator()(size_t i, const add_tag_layer, E>&) + { + tagged_layers.push_back(i); + const auto t = tag_id::id; + tag_to_layer.at(t) = from; + } + template