From 0eea94a0e02dd6d28175538a29720456f5213da9 Mon Sep 17 00:00:00 2001 From: Ronghang Hu Date: Sun, 8 Nov 2015 11:20:32 -0800 Subject: [PATCH] display 'ignore source layer' when initializing from existing parameters This helps in the case to see which layer is initialized from existing parameters, and which layer is ignored. This helps identify the cases where the user types a error mismatch layer name. --- src/caffe/net.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/caffe/net.cpp b/src/caffe/net.cpp index 1ad93e6af5f..05bee7987da 100644 --- a/src/caffe/net.cpp +++ b/src/caffe/net.cpp @@ -745,7 +745,7 @@ void Net::ShareTrainedLayersWith(const Net* other) { ++target_layer_id; } if (target_layer_id == layer_names_.size()) { - DLOG(INFO) << "Ignoring source layer " << source_layer_name; + LOG(INFO) << "Ignoring source layer " << source_layer_name; continue; } DLOG(INFO) << "Copying source layer " << source_layer_name; @@ -813,7 +813,7 @@ void Net::CopyTrainedLayersFrom(const NetParameter& param) { ++target_layer_id; } if (target_layer_id == layer_names_.size()) { - DLOG(INFO) << "Ignoring source layer " << source_layer_name; + LOG(INFO) << "Ignoring source layer " << source_layer_name; continue; } DLOG(INFO) << "Copying source layer " << source_layer_name; @@ -868,7 +868,7 @@ void Net::CopyTrainedLayersFromHDF5(const string trained_filename) { for (int i = 0; i < num_layers; ++i) { string source_layer_name = hdf5_get_name_by_idx(data_hid, i); if (!layer_names_index_.count(source_layer_name)) { - DLOG(INFO) << "Ignoring source layer " << source_layer_name; + LOG(INFO) << "Ignoring source layer " << source_layer_name; continue; } int target_layer_id = layer_names_index_[source_layer_name];