Fix warning in rnn_cell.py (#18164)
authorYong Tang <yong.tang.github@outlook.com>
Thu, 5 Apr 2018 23:49:06 +0000 (16:49 -0700)
committerAndrew Harp <andrewharp@users.noreply.github.com>
Thu, 5 Apr 2018 23:49:06 +0000 (19:49 -0400)
This fix fixes the warning in rnn_cell.py caused by l2_normalize with dim:
```
rnn_cell.py:2894: calling l2_normalize (from tensorflow.python.ops.nn_impl) with dim is deprecated and will be removed in a future version.
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
tensorflow/contrib/rnn/python/ops/rnn_cell.py

index 2f6ae9f..b12e2cd 100644 (file)
@@ -2891,7 +2891,7 @@ class WeightNormLSTMCell(rnn_cell_impl.RNNCell):
 
     output_size = weight.get_shape().as_list()[1]
     g = vs.get_variable(name, [output_size], dtype=weight.dtype)
-    return nn_impl.l2_normalize(weight, dim=0) * g
+    return nn_impl.l2_normalize(weight, axis=0) * g
 
   def _linear(self,
               args,