Wrap gplvm training in tf.function
"opt = gpflow.optimizers.Scipy()\n",
"maxiter = ci_niter(10000)\n",
"\n",
- "\n",
- "# @tf.function(autograph=False)\n",
+ "@tf.function(autograph=False)\n",
"def optimization_step():\n",
" return gplvm.neg_log_marginal_likelihood()\n",
"\n",
- "\n",
"_ = opt.minimize(optimization_step, variables=gplvm.trainable_variables, options=dict(maxiter=maxiter))"
]
},
