| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,6 +43,16 @@ def _Net_blob_loss_weights(self): | |||
| 43 | 43 | self._blob_loss_weights)) | |
| 44 | 44 | return self._blob_loss_weights_dict | |
| 45 | 45 | ||
| 46 | + @property | ||
| 47 | + def _Net_layer_dict(self): | ||
| 48 | + """ | ||
| 49 | + An OrderedDict (bottom to top, i.e., input to output) of network | ||
| 50 | + layers indexed by name | ||
| 51 | + """ | ||
| 52 | + if not hasattr(self, '_layer_dict'): | ||
| 53 | + self._layer_dict = OrderedDict(zip(self._layer_names, self.layers)) | ||
| 54 | + return self._layer_dict | ||
| 55 | + | ||
| 46 | 56 | ||
| 47 | 57 | @property | |
| 48 | 58 | def _Net_params(self): | |
@@ -311,6 +321,7 @@ def __getitem__(self, name): | |||
| 311 | 321 | # Attach methods to Net. | |
| 312 | 322 | Net.blobs = _Net_blobs | |
| 313 | 323 | Net.blob_loss_weights = _Net_blob_loss_weights | |
| 324 | + Net.layer_dict = _Net_layer_dict | ||
| 314 | 325 | Net.params = _Net_params | |
| 315 | 326 | Net.forward = _Net_forward | |
| 316 | 327 | Net.backward = _Net_backward | |
| Back | FazBrowse Home | New Git URL |
0 commit comments