-
Hi, #%%
x = torch.tensor(data[['ratio1', 'ratio2','ratio3','ratio4']].values, dtype=torch.float) for i in range(n_iter): When I iterate the function, I have an error :RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 4 but got size 2 for tensor number 1 in the list. Thanks a lot for your help!! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, Since the model need to remain the same input dimension, I set the non-related variables to 0. The function is written below. Let me know if there are better solutions. def initialize_model(train_x, train_y): |
Beta Was this translation helpful? Give feedback.
-
Hi Balandat, def initialize_model(x, y, var=None):
def optimize_qehvi_and_get_observation(model, x, y, ref_point, n_candidates, sampler):
|
Beta Was this translation helpful? Give feedback.
So one option you have is to use the
FilterFeatures
input transform that just picks out the desired features for the model. That way you don't have to introduce irrelevant zero features for one of your models.