diff options
author | 2017-08-16 11:14:42 -0700 | |
---|---|---|
committer | 2017-08-16 11:18:33 -0700 | |
commit | 4738e700ba88f46c139793c8a0ce48dc68c2d50e (patch) | |
tree | 225d8a5fadbf791c7b13a7f87e4cef28103eb77d /tensorflow/python/pywrap_tfe.i | |
parent | cf2961dda3f6f82d258ef6ad9f3502a018dda5a6 (diff) |
Initial tests for gradient code.
PiperOrigin-RevId: 165467540
Diffstat (limited to 'tensorflow/python/pywrap_tfe.i')
-rw-r--r-- | tensorflow/python/pywrap_tfe.i | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tensorflow/python/pywrap_tfe.i b/tensorflow/python/pywrap_tfe.i index ffa6d10cfa..07e715ede6 100644 --- a/tensorflow/python/pywrap_tfe.i +++ b/tensorflow/python/pywrap_tfe.i @@ -61,6 +61,22 @@ limitations under the License. } } +%typemap(in) const char* serialized_function_def { + $1 = TFE_GetPyThonString($input); +} + +%typemap(in) const char* device_name { + if ($input == Py_None) { + $1 = nullptr; + } else { + $1 = TFE_GetPyThonString($input); + } +} + +%typemap(in) const char* op_name { + $1 = TFE_GetPyThonString($input); +} + %include "tensorflow/c/eager/c_api.h" %typemap(in) TFE_InputTensorHandles* inputs (TFE_InputTensorHandles temp) { |