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

Function _create_zero_output

tensorflow/python/ops/rnn.py:1394–1404  ·  view source on GitHub ↗
(output_size)

Source from the content-addressed store, hash-verified

1392 "sequence_length must be a vector of length batch_size")
1393
1394 def _create_zero_output(output_size):
1395 # convert int to TensorShape if necessary
1396 size = _concat(batch_size, output_size)
1397 output = array_ops.zeros(
1398 array_ops.stack(size), _infer_state_dtype(dtype, state))
1399 shape = _concat(
1400 tensor_shape.dimension_value(fixed_batch_size),
1401 output_size,
1402 static=True)
1403 output.set_shape(tensor_shape.TensorShape(shape))
1404 return output
1405
1406 output_size = cell.output_size
1407 flat_output_size = nest.flatten(output_size)

Callers 1

static_rnnFunction · 0.70

Calls 4

_concatFunction · 0.85
_infer_state_dtypeFunction · 0.70
stackMethod · 0.45
set_shapeMethod · 0.45

Tested by

no test coverage detected