From 35b92b16316f19a7f1f1b1313c9ab874f4d6199b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Arrufat?= Date: Thu, 4 Feb 2021 17:42:35 +0900 Subject: [PATCH] remove enable_bias() method, since the visitor is now a friend --- dlib/dnn/layers.h | 3 +-- dlib/dnn/layers_abstract.h | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/dlib/dnn/layers.h b/dlib/dnn/layers.h index ce571ef5e..4d105ed8b 100644 --- a/dlib/dnn/layers.h +++ b/dlib/dnn/layers.h @@ -113,7 +113,6 @@ namespace dlib void set_bias_learning_rate_multiplier(double val) { bias_learning_rate_multiplier = val; } void set_bias_weight_decay_multiplier(double val) { bias_weight_decay_multiplier = val; } void disable_bias() { use_bias = false; } - void enable_bias() { use_bias = true; } bool bias_is_disabled() const { return !use_bias; } inline dpoint map_input_to_output ( @@ -2538,7 +2537,7 @@ namespace dlib { const size_t num_params = k_in * conv.num_filters() * conv.nr() * conv.nc() + conv.num_filters(); DLIB_CASSERT(num_params == conv.params.size() + conv.num_filters()); - conv.enable_bias(); + conv.use_bias = true; resizable_tensor filters = conv.params; conv.params.set_size(num_params); std::copy(filters.begin(), filters.end(), conv.params.begin()); diff --git a/dlib/dnn/layers_abstract.h b/dlib/dnn/layers_abstract.h index ad4070152..6badda5e6 100644 --- a/dlib/dnn/layers_abstract.h +++ b/dlib/dnn/layers_abstract.h @@ -926,13 +926,6 @@ namespace dlib - bias_is_disabled() returns true !*/ - void enable_bias( - ); - /*! - ensures - - bias_is_disabled() returns false - !*/ - bool bias_is_disabled( ) const; /*!