Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusMNoack committed Jun 13, 2024
1 parent 8c791e5 commit 248e1e5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions fvgp/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,10 @@ def train(self,
Hessian function of the objective function have to be defined.")
if method == 'mcmc': objective_function = self.marginal_density.log_likelihood
if objective_function is None: objective_function = self.marginal_density.neg_log_likelihood
if objective_function_gradient is None: objective_function_gradient = self.marginal_density.neg_log_likelihood_gradient
if objective_function_hessian is None: objective_function_hessian = self.marginal_density.neg_log_likelihood_hessian
if objective_function_gradient is None:
objective_function_gradient = self.marginal_density.neg_log_likelihood_gradient
if objective_function_hessian is None:
objective_function_hessian = self.marginal_density.neg_log_likelihood_hessian

logger.info("objective function: {}", objective_function)
logger.info("method: {}", method)
Expand Down Expand Up @@ -587,8 +589,10 @@ def train_async(self,
high=hyperparameter_bounds[:, 1],
size=len(hyperparameter_bounds))
if objective_function is None: objective_function = self.marginal_density.neg_log_likelihood
if objective_function_gradient is None: objective_function_gradient = self.marginal_density.neg_log_likelihood_gradient
if objective_function_hessian is None: objective_function_hessian = self.marginal_density.neg_log_likelihood_hessian
if objective_function_gradient is None: objective_function_gradient = (
self.marginal_density.neg_log_likelihood_gradient)
if objective_function_hessian is None: objective_function_hessian = (
self.marginal_density.neg_log_likelihood_hessian)

opt_obj = self.trainer.train_async(
objective_function=objective_function,
Expand Down

0 comments on commit 248e1e5

Please sign in to comment.