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

Function _unflatten_first_dim

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

Splits first dimension into [first_dim, -1].

(x, first_dim)

Source from the content-addressed store, hash-verified

1467
1468
1469def _unflatten_first_dim(x, first_dim):
1470 """Splits first dimension into [first_dim, -1]."""
1471 old_shape = array_ops.shape(x)
1472 new_shape = array_ops.concat([first_dim, [-1], old_shape[1:]], axis=0)
1473 return array_ops.reshape(x, new_shape)
1474
1475
1476def _inputs_with_flattening(pfor_input, input_indices):

Callers 10

_convert_flatten_batchFunction · 0.85
_convert_searchsortedFunction · 0.85
_convert_batch_mat_mulFunction · 0.85
_convert_selectFunction · 0.85
_convert_multinomialFunction · 0.85

Calls 3

reshapeMethod · 0.80
shapeMethod · 0.45
concatMethod · 0.45

Tested by

no test coverage detected