MCPcopy Create free account
hub / github.com/google-research/language / _unflatten

Function _unflatten

language/common/utils/tensor_utils.py:191–195  ·  view source on GitHub ↗
(flat_t)

Source from the content-addressed store, hash-verified

189 t = tf.reshape(t, [-1, input_shape[-1]])
190
191 def _unflatten(flat_t):
192 if len(input_shape) > 2:
193 return tf.reshape(flat_t, input_shape[:-1] + [shape(flat_t, -1)])
194 else:
195 return flat_t
196
197 return t, _unflatten
198

Callers

nothing calls this directly

Calls 1

shapeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…