peterroelants/peterroelants.github.io

Problem when running gaussian-process-kernel-fitting.ipynb

Closed this issue · 1 comments

Thank you very much for the great repo!
When I try to run the code in the notebook "gaussian-process-kernel-fitting.ipynb" in the "Tuning the hyperparameters" section I get the exception
"RuntimeError: loss passed to Optimizer.compute_gradients should be a function when eager execution is enabled."

It seems to be related to tensorflow version, but I could not solve it myself.
I tried the solution mention here:
https://stackoverflow.com/questions/57858219/loss-passed-to-optimizer-compute-gradients-should-be-a-function-when-eager-exe
However, that creates another problem.

my evironment is running under:
python 3.6.9
tensorflow==2.1.0
tensorflow-estimator==2.1.0
tensorflow-probability==0.9.0