You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
template <typename Dtype>
void Net<Dtype>::CopyTrainedLayersFrom(const NetParameter& param) {
int num_source_layers = param.layer_size();
for (int i = 0; i < num_source_layers; ++i) {
const LayerParameter& source_layer = param.layer(i);
const string& source_layer_name = source_layer.name();
int target_layer_id = 0;
while (target_layer_id != layer_names_.size() &&
layer_names_[target_layer_id] != source_layer_name) {
++target_layer_id;
}
If the network has two layers with the same name, the weights of the two layers will be copied from the caffemodel to the first layer in turn. As a result, the weight of the first layer takes the weight of the second layer, and the second layer has no weight.
The text was updated successfully, but these errors were encountered:
If the network has two layers with the same name, the weights of the two layers will be copied from the caffemodel to the first layer in turn. As a result, the weight of the first layer takes the weight of the second layer, and the second layer has no weight.
The text was updated successfully, but these errors were encountered: