1

I want to use AdamOptimizer with GPFlow, however I cannot import it as suggested as the source code in this link (line 26) specifies. I am unsure what I am missing. I have tried with different gpflow versions (1.1.1 and 1.3).

Thanks

prax1telis
  • 297
  • 2
  • 12
  • Do lines 24 and 25 come in just curious. Make sure to use pip or pip3 depending on your python – smitty_werbenjagermanjensen Jun 24 '19 at 17:23
  • 1
    What version of Tensorflow are you using? Perhaps try 1.15? I just used Tensorflow 1.15 on the from gpflow.training import AdamOptimizer and it worked to install a specfic version of TensorFlow use pip3 install tensorflow==1.5 I saw in the TensorFlow docs that AdamOptimizer came in the 1.14r or something so 1.15 version of TF might be the trick cause I just tested it – smitty_werbenjagermanjensen Jun 24 '19 at 18:46
  • 1
    I tried using tensorflow version 1.5 and it works now. Thanks you! – prax1telis Jun 24 '19 at 20:37

3 Answers3

2

This issue is now fixed in GPflow develop. See https://github.com/GPflow/GPflow/pull/997.

1

I guess it happens because you are using TF >=1.14. The released GPflow packages <= 1.4.1 support TF <=1.13.1 only. The GPflow develop branch now does support TF 1.14, but this has not yet been released.

There is an unofficial (in progress) GPflow2 with TF 2.0 support, if you are interested.

STJ
  • 1,478
  • 7
  • 25
Artem Artemev
  • 516
  • 3
  • 8
-1

Copy the fixes from this pull request (link) into your GPflow-1.4.1/gpflow/training/tensorflow_optimizer.py file and reinstall GPFlow.

Adam Erickson
  • 6,027
  • 2
  • 46
  • 33