Skip to content

Conversation

gitathrun
Copy link

@gitathrun gitathrun commented Apr 9, 2018

Recently update my Tensorflow to 1.7, when loading the model, got an warning:

model = Model()
WARNING:tensorflow: From xxxxxxx\encoder.py: 59: calling l2_normalize (from tensorflow.python.ops.nn_impl) with dim is deprecated and will be removed in a future version.

Changed the code from encoder.py: 58-62
change the dim parameter into axis

    if wn:
        wx = tf.nn.l2_normalize(wx, axis=0) * gx
        wh = tf.nn.l2_normalize(wh, axis=0) * gh
        wmx = tf.nn.l2_normalize(wmx, axis=0) * gmx
        wmh = tf.nn.l2_normalize(wmh, axis=0) * gmh

The warning is gone.

@gitathrun
Copy link
Author

I think I posted in the wrong category, please delete this post, and the same topic issue is posted in "Issues" category.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants