DANet dimensions issue with dataset openml__sulfur__360966
duncanmcelfresh opened this issue · comments
duncanmcelfresh commented
occurs with dataset openml__sulfur__360966
example 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/danet.py", line 79, in fit
self.model.fit(
File "/home/shared/tabzilla/TabSurvey/models/danet_lib/abstract_model.py", line 154, in fit
self._train_epoch(train_dataloader)
File "/home/shared/tabzilla/TabSurvey/models/danet_lib/abstract_model.py", line 247, in _train_epoch
batch_logs = self._train_batch(X, y)
File "/home/shared/tabzilla/TabSurvey/models/danet_lib/abstract_model.py", line 279, in _train_batch
output = self.network(X)
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 "/home/shared/tabzilla/TabSurvey/models/danet_lib/model/DANet.py", line 104, in forward
out = self.init_layer(x)
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 "/home/shared/tabzilla/TabSurvey/models/danet_lib/model/DANet.py", line 78, in forward
out = self.conv1(pre_out)
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 "/home/shared/tabzilla/TabSurvey/models/danet_lib/model/DANet.py", line 58, in forward
x = self.bn(x)
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 "/home/shared/tabzilla/TabSurvey/models/danet_lib/model/DANet.py", line 26, in forward
res = [self.bn(x_) for x_ in chunks]
File "/home/shared/tabzilla/TabSurvey/models/danet_lib/model/DANet.py", line 26, in <listcomp>
res = [self.bn(x_) for x_ in chunks]
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/batchnorm.py", line 168, in forward
return F.batch_norm(
File "/opt/conda/envs/torch/lib/python3.10/site-packages/torch/nn/functional.py", line 2419, in batch_norm
_verify_batch_size(input.size())
File "/opt/conda/envs/torch/lib/python3.10/site-packages/torch/nn/functional.py", line 2387, in _verify_batch_size
raise ValueError("Expected more than 1 value per channel when training, got input size {}".format(size))
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 320, 1])