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

Function _norm

tensorflow/contrib/rnn/python/ops/rnn_cell.py:86–95  ·  view source on GitHub ↗
(g, b, inp, scope)

Source from the content-addressed store, hash-verified

84
85
86def _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
98class CoupledInputForgetGateLSTMCell(rnn_cell_impl.RNNCell):

Callers 2

callMethod · 0.85
callMethod · 0.85

Calls 3

variable_scopeMethod · 0.80
get_shapeMethod · 0.45
get_variableMethod · 0.45

Tested by

no test coverage detected