Replies: 2 comments 2 replies
-
Hi @MJeong19 ,
Sorry, I'm not sure I understand your question. Are you saying that you are trying to use an existing BoTorch acquisition function and you got an error, so you tried modifying the code? Or have you been working with an acquisition function that you wrote yourself all along? |
Beta Was this translation helpful? Give feedback.
-
Hi @MJeong19. I see that you're using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, I am coding the acquisition function for multi-objective Bayesian optimization.
The “element 0 of tensors does not require grad and does not have a grad_fn” occured, so I am trying to fix this error. This error did not occur when I used other acquisition function, so I am trying to modify the code of acquisition function. To fix this, I removed .item() from hv = bd.compute_hypervolume().item(). However, since the result of bd.compute_hypervolume().item() was 0-dimension tensor, I added the code hv.unsqueeze(0).
However, an error occured:

After anomaly detection, the error was from the acquisition function.
I added .clone() in mean and variance of the posterior model in forward function, but the error still occured.
I would like to know how can I solve this error.
Here is the code of the acquisition function.
Beta Was this translation helpful? Give feedback.
All reactions