(g, b, inp, scope)
| 84 | |
| 85 | |
| 86 | def _norm(g, b, inp, scope): |
| 87 | shape = inp.get_shape()[-1:] |
| 88 | gamma_init = init_ops.constant_initializer(g) |
| 89 | beta_init = init_ops.constant_initializer(b) |
| 90 | with vs.variable_scope(scope): |
| 91 | # Initialize beta and gamma for use by layer_norm. |
| 92 | vs.get_variable("gamma", shape=shape, initializer=gamma_init) |
| 93 | vs.get_variable("beta", shape=shape, initializer=beta_init) |
| 94 | normalized = layers.layer_norm(inp, reuse=True, scope=scope) |
| 95 | return normalized |
| 96 | |
| 97 | |
| 98 | class CoupledInputForgetGateLSTMCell(rnn_cell_impl.RNNCell): |
no test coverage detected