ImportError: cannot import name 'AdamOptimizer' in gpflow

独自空忆成欢 提交于 2019-12-23 02:26:54

问题


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


回答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.




回答2:


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




回答3:


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



来源:https://stackoverflow.com/questions/56741160/importerror-cannot-import-name-adamoptimizer-in-gpflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!