Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target size issue - VIME and MLP #85

Open
duncanmcelfresh opened this issue Dec 15, 2022 · 0 comments
Open

target size issue - VIME and MLP #85

duncanmcelfresh opened this issue Dec 15, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@duncanmcelfresh
Copy link
Collaborator

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([]))
@duncanmcelfresh duncanmcelfresh added the bug Something isn't working label Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant