| 965 | |
| 966 | template <typename Dtype> |
| 967 | const shared_ptr<Blob<Dtype> > Net<Dtype>::blob_by_name( |
| 968 | const string& blob_name) const { |
| 969 | shared_ptr<Blob<Dtype> > blob_ptr; |
| 970 | if (has_blob(blob_name)) { |
| 971 | blob_ptr = blobs_[blob_names_index_.find(blob_name)->second]; |
| 972 | } else { |
| 973 | blob_ptr.reset((Blob<Dtype>*)(NULL)); |
| 974 | LOG(WARNING) << "Unknown blob name " << blob_name; |
| 975 | } |
| 976 | return blob_ptr; |
| 977 | } |
| 978 | |
| 979 | template <typename Dtype> |
| 980 | bool Net<Dtype>::has_layer(const string& layer_name) const { |