MCPcopy Create free account
hub / github.com/alibaba/bigcomputing / _create_zero_output

Function _create_zero_output

DIEN/rnn.py:1227–1234  ·  view source on GitHub ↗
(output_size)

Source from the content-addressed store, hash-verified

1225 "sequence_length must be a vector of length batch_size")
1226
1227 def _create_zero_output(output_size):
1228 # convert int to TensorShape if necessary
1229 size = _concat(batch_size, output_size)
1230 output = array_ops.zeros(
1231 array_ops.stack(size), _infer_state_dtype(dtype, state))
1232 shape = _concat(fixed_batch_size.value, output_size, static=True)
1233 output.set_shape(tensor_shape.TensorShape(shape))
1234 return output
1235
1236 output_size = cell.output_size
1237 flat_output_size = nest.flatten(output_size)

Callers 1

static_rnnFunction · 0.85

Calls 1

_infer_state_dtypeFunction · 0.85

Tested by

no test coverage detected