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

Function _shape_common

tensorflow/python/ops/data_flow_ops.py:103–113  ·  view source on GitHub ↗

The greatest lower bound (ordered by specificity) TensorShape.

(s1, s2)

Source from the content-addressed store, hash-verified

101
102
103def _shape_common(s1, s2):
104 """The greatest lower bound (ordered by specificity) TensorShape."""
105 s1 = tensor_shape.TensorShape(s1)
106 s2 = tensor_shape.TensorShape(s2)
107 if s1.ndims is None or s2.ndims is None or s1.ndims != s2.ndims:
108 return tensor_shape.unknown_shape()
109 d = [
110 d1 if d1 is not None and d1 == d2 else None
111 for (d1, d2) in zip(s1.as_list(), s2.as_list())
112 ]
113 return tensor_shape.TensorShape(d)
114
115
116# pylint: disable=protected-access

Callers

nothing calls this directly

Calls 2

as_listMethod · 0.95
unknown_shapeMethod · 0.80

Tested by

no test coverage detected