question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for XavierLarningRateScaling in TF 1.14+

See original GitHub issue

Optimizers tests are failing with TF 1.14.0rc0 and TF 1.14.0rc1.

Error output:

self = <larq.optimizers.XavierLearningRateScaling object at 0x133f54e80>, name = 'optimizer'
                                                                                                                                                             
    def __getattribute__(self, name):                                                                                                                        
      """Overridden to support hyperparameter access."""
      try:                            
>       return super(OptimizerV2, self).__getattribute__(name)
E       AttributeError: 'XavierLearningRateScaling' object has no attribute 'optimizer'
                                      
../venv-bop/lib/python3.7/site-packages/tensorflow/python/keras/optimizer_v2/optimizer_v2.py:532: AttributeError

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lgeigercommented, Jun 24, 2019

If I recall correctly, I ran into some troubles since the learning rates in TensorFlow 1.14+ are now Tensors instead of floats, but I didn’t investigate further since TF 2 was still in alpha then. I pushed one (probably broken) workaround I had on my local system: https://github.com/plumerai/larq/blob/xavierv2/larq/optimizers.py

0reactions
lgeigercommented, Jun 24, 2019

Beside implementing the new optimizer API, do you see any other difficulties to get this working with TF 1.14+? we have already updated the API for Bop optimizer and it shouldn’t be a huge hassle, IMO.

I also encountered errors due to these lines, but that might be because I was trying to support both v1 and v2 in one implementation. I can push my WIP branch from some time ago and we can take a look and see if there is a quick fix 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add support for XavierLarningRateScaling in TF 1.14+ #101
Optimizers tests are failing with TF 1.14.0rc0 and TF 1.14.0rc1. Error output: self = , name = 'optimizer' def __getattribute__(self, ...
Read more >
Install TensorFlow with pip
This guide is for the latest stable version of TensorFlow. For the preview build (nightly), use the pip package named tf-nightly . Refer...
Read more >
TensorFlow for Jetson Platform Release Notes
Bug fixes and improvements for TF-TRT. For more information, see the TensorFlow-TensorRT (TF-TRT) User Guide and the TensorFlow Container ...
Read more >
Keras that does not support TensorFlow 2.0. We recommend ...
Downgraded my TensorFlow to version 1.14 using the following: !pip install tensorflow==1.14.0 ... classifier.add(tf.keras.layers.
Read more >
Installing successfully CUDA 10.1 and Tensorflow 1.14 to ...
Here I will present to you how to set up an environment to train your models using GPU with Cuda 10.x and Tensorflow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found