Skip to content

Commit

Permalink
Merge pull request JasperSnoek#52 from emcastillo/master
Browse files Browse the repository at this point in the history
1 variable with 1 dimension fixed
  • Loading branch information
JasperSnoek committed Feb 12, 2016
2 parents 9fd9a4a + 70309f0 commit b37a541
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spearmint/spearmint/chooser/GPEIOptChooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,11 @@ def grad_optimize_ei(self, cand, comp, pend, vals, compute_grad=True):
g_ei_s2 = 0.5*npdf / func_s

# Apply covariance function
grad_cross = np.squeeze(cand_cross_grad)
# Squeeze can break the 1D case be careful
if pend.shape[1] == 1:
grad_cross = np.squeeze(cand_cross_grad, axis=(2,))
else:
grad_cross = np.squeeze(cand_cross_grad)

grad_xp_m = np.dot(alpha.transpose(),grad_cross)
grad_xp_v = np.dot(-2*spla.cho_solve(
Expand Down

0 comments on commit b37a541

Please sign in to comment.