MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / lstm_init

Function lstm_init

NLP/Text2SQL-BASELINE/text2sql/utils/nn_utils.py:56–61  ·  view source on GitHub ↗
(num_layers, hidden_size, *batch_sizes)

Source from the content-addressed store, hash-verified

54
55
56def lstm_init(num_layers, hidden_size, *batch_sizes):
57 init_size = batch_sizes + (hidden_size,)
58 if num_layers is not None:
59 init_size = (num_layers,) + init_size
60 init = paddle.zeros(init_size)
61 return (init, init)
62
63
64def batch_gather_2d(var, indices):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected