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

Function External

tensorflow/contrib/specs/python/specs_lib.py:189–204  ·  view source on GitHub ↗

Import a function from an external module. Note that the `module_name` must be a module name that works with the usual import mechanisms. Shorthands like "tf.nn" will not work. Args: module_name: name of the module function_name: name of the function within the module Return

(module_name, function_name)

Source from the content-addressed store, hash-verified

187# These are DSL names, not Python names
188# pylint: disable=invalid-name, exec-used
189def External(module_name, function_name):
190 """Import a function from an external module.
191
192 Note that the `module_name` must be a module name
193 that works with the usual import mechanisms. Shorthands
194 like "tf.nn" will not work.
195
196 Args:
197 module_name: name of the module
198 function_name: name of the function within the module
199
200 Returns:
201 Function-wrapped value of symbol.
202 """
203 module = importlib.import_module(module_name)
204 return Function(vars(module)[function_name])
205
206
207def Import(statements):

Callers

nothing calls this directly

Calls 1

FunctionClass · 0.70

Tested by

no test coverage detected