-1

I want to use GPflow's AdamOptimizer in my python code.

As mentioned in the previous post, gpflow is working with a certain version of the TensorFlow.

I followed the answer in post, I tried three different combinations inside the virtual environment.

Tensorflow    GPflow
  1.5          1.4
  1.13.0       1.2.0
  1.11.0       1.2.0

I still can't implement:

gpflow.train.AdamOptimizer 

Error is: Cannot find the reference in the init.py

Do you have any suggestions for me?

P.S. I think this question is not the duplicate of post, because the answer of that post is not working for me.

Ahmet
  • 7,527
  • 3
  • 23
  • 47
  • My favourite way of using GPflow is to use the latest develop branch (by cloning the repo and then running `python setup.py develop`), with the latest version of TensorFlow. – Mark van der Wilk Jul 19 '19 at 14:25
  • 1
    Possible duplicate of [ImportError: cannot import name 'AdamOptimizer' in gpflow](https://stackoverflow.com/questions/56741160/importerror-cannot-import-name-adamoptimizer-in-gpflow) – STJ Jul 19 '19 at 15:19

2 Answers2

0

The combinations you suggest don't make sense - tensorflow 1.5 is really old, and we did not bother staying backwards compatible given how fast tensorflow is moving. Likewise, gpflow 1.2 is quite old at this point and can't be expected to work with more recent tensorflow versions.

If you look at the release notes, you'll see that GPflow 1.4 is the first version that supports tensorflow 1.12 and 1.13. We fixed support for tensorflow 1.14 in the develop branch (install as suggested in Mark van der Wilk's comment), but this has not yet been released as a PyPI/pip package. (GPflow 1.3 should support tensorflow 1.11, but I've not tested that out.)

STJ
  • 1,478
  • 7
  • 25
0

Tensorflow 1.11.0 with GPflow 1.2.0 version is compatible.

Ahmet
  • 7,527
  • 3
  • 23
  • 47
  • At the moment TF >= 1.14 and < 2.0 is supported only by `develop` in GPflow. As @stj pointed out, you question repeats this one: https://stackoverflow.com/questions/56741160/importerror-cannot-import-name-adamoptimizer-in-gpflow. – Artem Artemev Jul 19 '19 at 22:11