naszilla / tabzilla

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

target size issue - VIME and MLP

duncanmcelfresh opened this issue · comments

the following dimension issue occurs with VIME and MLP, on dataset openml__sylvine__168912

EXAMPLE traceback: the actual traceback changes with dimension:

Traceback (most recent call last):
  File "/home/shared/tabzilla/TabSurvey/tabzilla_experiment.py", line 136, in __call__
    result = cross_validation(model, self.dataset, self.time_limit)
  File "/home/shared/tabzilla/TabSurvey/tabzilla_utils.py", line 237, in cross_validation
    loss_history, val_loss_history = curr_model.fit(
  File "/home/shared/tabzilla/TabSurvey/models/vime.py", line 54, in fit
    loss_history, val_loss_history = self.fit_semi(
  File "/home/shared/tabzilla/TabSurvey/models/vime.py", line 248, in fit_semi
    val_loss += loss_func_supervised(y_hat, batch_val_y.to(self.device))
  File "/opt/conda/envs/torch/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/opt/conda/envs/torch/lib/python3.10/site-packages/torch/nn/modules/loss.py", line 713, in forward
    return F.binary_cross_entropy_with_logits(input, target,
  File "/opt/conda/envs/torch/lib/python3.10/site-packages/torch/nn/functional.py", line 3130, in binary_cross_entropy_with_logits
    raise ValueError("Target size ({}) must be the same as input size ({})".format(target.size(), input.size()))
ValueError: Target size (torch.Size([1])) must be the same as input size (torch.Size([]))