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

Function identity

tensorflow/contrib/labeled_tensor/python/ops/core.py:598–614  ·  view source on GitHub ↗

The identity op. See tf.identity. Args: labeled_tensor: The input tensor. name: Optional op name. Returns: The tensor.

(labeled_tensor, name=None)

Source from the content-addressed store, hash-verified

596@tc.returns(LabeledTensor)
597@tc.accepts(LabeledTensorLike, tc.Optional(string_types))
598def identity(labeled_tensor, name=None):
599 """The identity op.
600
601 See tf.identity.
602
603 Args:
604 labeled_tensor: The input tensor.
605 name: Optional op name.
606
607 Returns:
608 The tensor.
609 """
610 with ops.name_scope(name, 'lt_identity', [labeled_tensor]) as scope:
611 labeled_tensor = convert_to_labeled_tensor(labeled_tensor)
612 return LabeledTensor(
613 array_ops.identity(labeled_tensor.tensor, name=scope),
614 labeled_tensor.axes)
615
616
617# We don't call this slice because that shadows a built-in. Instead, we alias

Callers 2

RemoveListArrayConverterFunction · 0.50
FillIdentityEigenImplFunction · 0.50

Calls 4

LabeledTensorClass · 0.85
name_scopeMethod · 0.45
identityMethod · 0.45

Tested by

no test coverage detected