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

Function _create_op

tensorflow/python/ops/parallel_for/pfor.py:901–908  ·  view source on GitHub ↗

Utility to create an op.

(op_type, inputs, op_dtypes, attrs=None)

Source from the content-addressed store, hash-verified

899
900# TODO(agarwal): call raw_ops instead of calling these low level routines.
901def _create_op(op_type, inputs, op_dtypes, attrs=None):
902 """Utility to create an op."""
903 op = ops.get_default_graph().create_op(
904 op_type, inputs, op_dtypes, attrs=attrs, compute_device=True)
905 flat_attrs = nest.flatten([(str(a), op.get_attr(str(a))) for a in attrs])
906 execute.record_gradient(
907 op_type, op.inputs, tuple(flat_attrs), op.outputs[:], "")
908 return op
909
910
911WrappedTensor = collections.namedtuple("WrappedTensor",

Callers 12

while_bodyFunction · 0.85
_convert_helperMethod · 0.85
_convert_flatten_batchFunction · 0.85
_convert_gradsFunction · 0.85
_convert_selectFunction · 0.85
_convert_randomFunction · 0.85
_convert_assertFunction · 0.85
_convert_printFunction · 0.85

Calls 4

tupleFunction · 0.85
create_opMethod · 0.45
flattenMethod · 0.45
get_attrMethod · 0.45

Tested by

no test coverage detected