MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / to_code_v1

Function to_code_v1

tensorflow/python/autograph/impl/api.py:694–727  ·  view source on GitHub ↗

Similar to `to_graph`, but returns Python source code as a string. Also see: `tf.autograph.to_graph`. `to_graph` returns the Python source code that can be used to generate a TensorFlow graph that is functionally identical to the input Python code. Args: entity: Python callable or cla

(entity,
               recursive=True,
               arg_values=None,
               arg_types=None,
               indentation='  ',
               experimental_optional_features=None)

Source from the content-addressed store, hash-verified

692
693@tf_export(v1=['autograph.to_code'])
694def to_code_v1(entity,
695 recursive=True,
696 arg_values=None,
697 arg_types=None,
698 indentation=' ',
699 experimental_optional_features=None):
700 """Similar to `to_graph`, but returns Python source code as a string.
701
702 Also see: `tf.autograph.to_graph`.
703
704 `to_graph` returns the Python source code that can be used to generate a
705 TensorFlow graph that is functionally identical to the input Python code.
706
707 Args:
708 entity: Python callable or class to convert.
709 recursive: Whether to recursively convert any functions that the converted
710 function may call.
711 arg_values: Deprecated.
712 arg_types: Deprecated.
713 indentation: Deprecated.
714 experimental_optional_features: `None`, a tuple of, or a single
715 `tf.autograph.experimental.Feature` value. Controls the use of optional
716 features in the conversion process.
717
718 Returns:
719 The converted code as string.
720 """
721 del arg_values
722 del arg_types
723 del indentation
724 return to_code(
725 entity,
726 recursive=recursive,
727 experimental_optional_features=experimental_optional_features)
728
729
730@tf_export('autograph.to_code', v1=[])

Callers

nothing calls this directly

Calls 1

to_codeFunction · 0.85

Tested by

no test coverage detected