Internal function that routes the operator generation to the network's __getattr__ function.
(self, op_type, inputs=None, *args, **kwargs)
| 268 | return self._name[self._name.rfind(scope._NAMESCOPE_SEPARATOR) + 1:] |
| 269 | |
| 270 | def _CreateAndAddToNet(self, op_type, inputs=None, *args, **kwargs): |
| 271 | """Internal function that routes the operator generation to the |
| 272 | network's __getattr__ function. |
| 273 | """ |
| 274 | inputs = [] if inputs is None else inputs |
| 275 | if isinstance(inputs, BlobReference) or isinstance(inputs, str): |
| 276 | inputs = [inputs] |
| 277 | # add self to the input list. |
| 278 | inputs.insert(0, self) |
| 279 | return self._from_net.__getattr__(op_type)(inputs, *args, **kwargs) |
| 280 | |
| 281 | def __getattr__(self, op_type): |
| 282 | """A wrapper allowing one to initiate operators from a blob reference. |
no test coverage detected