Add a function definition to the context. Once added, the function (identified by its name) can be executed like any other operation. Args: fn: A wrapped TF_Function (returned from TF_GraphToFunction_wrapper).
(self, fn)
| 966 | return self._num_gpus |
| 967 | |
| 968 | def add_function(self, fn): |
| 969 | """Add a function definition to the context. |
| 970 | |
| 971 | Once added, the function (identified by its name) can be executed like any |
| 972 | other operation. |
| 973 | |
| 974 | Args: |
| 975 | fn: A wrapped TF_Function (returned from TF_GraphToFunction_wrapper). |
| 976 | """ |
| 977 | self.ensure_initialized() |
| 978 | pywrap_tensorflow.TFE_ContextAddFunction(self._handle, fn) |
| 979 | |
| 980 | def add_function_def(self, fdef): |
| 981 | """Add a function definition to the context. |