We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After training on server, I got DS-GAN-Epoch300.pth, I wanted to use this weight for single-card inference.
DS-GAN-Epoch300.pth
I changed device_ids = [0, 1, 2, 3] to device_ids = [0], and ran infer.py, then I got this error:
device_ids = [0, 1, 2, 3]
device_ids = [0]
infer.py
Traceback (most recent call last): File "/data/PosterLayout-CVPR2023/infer.py", line 114, in <module> main() File "/data/PosterLayout-CVPR2023/infer.py", line 111, in main test(G, testing_dl, 1) File "/data/PosterLayout-CVPR2023/infer.py", line 58, in test cls, box = G(imgs, fix_noise) File "/data/anaconda3/envs/pl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/data/anaconda3/envs/pl/lib/python3.9/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward return self.module(*inputs[0], **kwargs[0]) File "/data/anaconda3/envs/pl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/data/PosterLayout-CVPR2023/model.py", line 99, in forward lstm_output = self.cnnlstm(layout, h0) File "/data/anaconda3/envs/pl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/data/PosterLayout-CVPR2023/model.py", line 78, in forward output, _ = self.lstm(x, (torch.zeros_like(h0).contiguous(), h0.contiguous())) File "/data/anaconda3/envs/pl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/data/anaconda3/envs/pl/lib/python3.9/site-packages/torch/nn/modules/rnn.py", line 767, in forward self.check_forward_args(input, hx, batch_sizes) File "/data/anaconda3/envs/pl/lib/python3.9/site-packages/torch/nn/modules/rnn.py", line 693, in check_forward_args self.check_hidden_size(hidden[0], self.get_expected_hidden_size(input, batch_sizes), File "/data/anaconda3/envs/pl/lib/python3.9/site-packages/torch/nn/modules/rnn.py", line 226, in check_hidden_size raise RuntimeError(msg.format(expected_hidden_size, list(hx.size()))) RuntimeError: Expected hidden[0] size (8, 4, 256), got [8, 1, 256]
Would you please try this, or offer some tips and instructions on single-card inference? Thank you!
The text was updated successfully, but these errors were encountered:
Setting test_batch_size to 1 solved my problem.
test_batch_size
Sorry, something went wrong.
No branches or pull requests
After training on server, I got
DS-GAN-Epoch300.pth
, I wanted to use this weight for single-card inference.I changed
device_ids = [0, 1, 2, 3]
todevice_ids = [0]
, and raninfer.py
, then I got this error:Would you please try this, or offer some tips and instructions on single-card inference? Thank you!
The text was updated successfully, but these errors were encountered: