Skip to content

How to specify perturbation function #2575

Answered by saitcakmak
samuelkim16 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @samuelkim16.

I would expect the input shape to perturb_input is [5, 2] but during optimization, the input shape is [128, 5, 2].

In BoTorch, we use batch evaluations within acquisition functions.

        perturbation_set: An `n_p x d`-dim tensor denoting the perturbations
            to be added to the inputs. Alternatively, this can be a callable that
            returns `batch x n_p x d`-dim tensor of perturbations for input of
            shape `batch x d`. This is useful for heteroscedastic perturbations.

The batch x d here refers to an arbitrary batch shape, which in your case is 128 x 5. You should update perturb_input to support batch inputs. Here's an (untested) example o…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@samuelkim16
Comment options

@saitcakmak
Comment options

@samuelkim16
Comment options

Answer selected by samuelkim16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants