naszilla / tabzilla

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

another TabTransformer dimension issue

duncanmcelfresh opened this issue · comments

occurs on datasets:

  • openml__banknote-authentication__10093
  • openml__blood-transfusion-service-center__10101
  • openml__blood-transfusion-service-center__145836
  • openml__phoneme__9952
  • openml__skin-segmentation__9965
  • openml__sylvine__168912
  • openml__wilt__146820

traceback:

Traceback (most recent call last):
  File "/home/shared/tabzilla/TabSurvey/tabzilla_experiment.py", line 137, in __call__
    result = cross_validation(model, self.dataset, self.time_limit)
  File "/home/shared/tabzilla/TabSurvey/tabzilla_utils.py", line 236, in cross_validation
    loss_history, val_loss_history = curr_model.fit(
  File "/home/shared/tabzilla/TabSurvey/models/tabtransformer.py", line 116, in fit
    loss = loss_func(out, batch_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([128])) must be the same as input size (torch.Size([]))