Skip to content

Commit

Permalink
minor README update
Browse files Browse the repository at this point in the history
  • Loading branch information
kpe committed May 24, 2019
1 parent 8ecf274 commit a4b9b0a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/ext/modeling.py
Expand Up @@ -368,8 +368,9 @@ def layer_norm(input_tensor, name=None):
epsilon = 1e-12

input_shape = input_tensor.shape
gamma = tf.compat.v1.get_variable(name="gamma", shape=input_shape[-1:], initializer=tf.compat.v1.initializers.ones(), trainable=True)
beta = tf.compat.v1.get_variable(name="beta", shape=input_shape[-1:], initializer=tf.compat.v1.initializers.zeros(), trainable=True)
with tf.compat.v1.variable_scope("LayerNorm"):
gamma = tf.compat.v1.get_variable(name="gamma", shape=input_shape[-1:], initializer=tf.compat.v1.initializers.ones(), trainable=True)
beta = tf.compat.v1.get_variable(name="beta", shape=input_shape[-1:], initializer=tf.compat.v1.initializers.zeros(), trainable=True)

x = input_tensor
if tf.__version__.startswith("2."):
Expand Down

0 comments on commit a4b9b0a

Please sign in to comment.