Shue commited on
Commit
6898761
1 Parent(s): 7492e01

updated generator.py

Browse files
Files changed (1) hide show
  1. generator.py +5 -4
generator.py CHANGED
@@ -1,10 +1,11 @@
1
- import tensorflow.contrib as tf_contrib
2
  import tensorflow as tf
3
 
4
  def layer_norm(x, scope='layer_norm') :
5
- return tf_contrib.layers.layer_norm(x,
6
- center=True, scale=True,
7
- scope=scope)
 
8
 
9
  def lrelu(x, alpha=0.2):
10
  return tf.nn.leaky_relu(x, alpha)
 
1
+ # import tensorflow.contrib as tf_contrib
2
  import tensorflow as tf
3
 
4
  def layer_norm(x, scope='layer_norm') :
5
+ # return tf_contrib.layers.layer_norm(x,
6
+ # center=True, scale=True,
7
+ # scope=scope)
8
+ return tf.keras.layers.LayerNormalization(x, center=True, scale=True)
9
 
10
  def lrelu(x, alpha=0.2):
11
  return tf.nn.leaky_relu(x, alpha)