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

Function _convert_flatten_batch

tensorflow/python/ops/parallel_for/pfor.py:1501–1510  ·  view source on GitHub ↗
(pfor_input, op_type, dims)

Source from the content-addressed store, hash-verified

1499@RegisterPForWithArgs("MaxPoolGradGrad", dims=[0, 1, 2])
1500@RegisterPForWithArgs("SoftmaxCrossEntropyWithLogits", dims=[0, 1])
1501def _convert_flatten_batch(pfor_input, op_type, dims):
1502 del op_type
1503 inputs = _inputs_with_flattening(pfor_input, dims)
1504 outputs = _create_op(
1505 pfor_input.op_type,
1506 inputs, [x.dtype for x in pfor_input.outputs],
1507 attrs=pfor_input.op.node_def.attr).outputs
1508 n = pfor_input.pfor.loop_len_vector
1509 outputs = [_unflatten_first_dim(x, n) for x in outputs]
1510 return [wrap(x, True) for x in outputs]
1511
1512
1513_channel_flatten_input_cache = {}

Callers

nothing calls this directly

Calls 4

_inputs_with_flatteningFunction · 0.85
_create_opFunction · 0.85
_unflatten_first_dimFunction · 0.85
wrapFunction · 0.70

Tested by

no test coverage detected