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

Function build_layer_norm

NLP/Text2SQL-BASELINE/text2sql/utils/nn_utils.py:45–53  ·  view source on GitHub ↗
(n_in, name)

Source from the content-addressed store, hash-verified

43
44
45def build_layer_norm(n_in, name):
46 return nn.LayerNorm(
47 normalized_shape=n_in,
48 weight_attr=paddle.ParamAttr(
49 name='%s_layer_norm_scale' % name if name is not None else None,
50 initializer=nn.initializer.Constant(1.)),
51 bias_attr=paddle.ParamAttr(
52 name='%s_layer_norm_bias' % name if name is not None else None,
53 initializer=nn.initializer.Constant(0.)), )
54
55
56def lstm_init(num_layers, hidden_size, *batch_sizes):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected