From 4a2f0192e73db0c61c7b66dccfbe5bcd322bec9d Mon Sep 17 00:00:00 2001 From: Davis King Date: Tue, 18 Oct 2016 22:54:34 -0400 Subject: [PATCH] Fixed a bug in the repeat layer that caused it to throw exceptions in some cases. --- dlib/dnn/core.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlib/dnn/core.h b/dlib/dnn/core.h index 6e3594074..6d806f49b 100644 --- a/dlib/dnn/core.h +++ b/dlib/dnn/core.h @@ -81,7 +81,6 @@ namespace dlib resizable_tensor& ) const { - DLIB_CASSERT(false,"This function should never be called"); } friend void serialize(const repeat_input_layer&, std::ostream&){} @@ -1681,6 +1680,11 @@ namespace dlib ) const { subnetwork.to_tensor(ibegin,iend,data); + // call to_tensor on the networks in details just to populate the + // _sample_expansion_factor values in those networks. Other than that this + // call is a noop. + for (auto& d : details) + d.to_tensor(ibegin, iend, data); } template