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

训练报错,RuntimeError: The size of tensor a (3) must match the size of tensor b (0) at non-singleton dimension 3 求解答 #178

Open
yueool opened this issue Apr 18, 2024 · 1 comment

Comments

@yueool
Copy link

yueool commented Apr 18, 2024

Traceback (most recent call last):
File "D:\GeneFacePlusPlus_py39\utils\commons\trainer.py", line 240, in run_single_process
self.train()
File "D:\GeneFacePlusPlus_py39\utils\commons\trainer.py", line 320, in train
self.evaluate(self.task, False, 'Sanity Val', max_batches=self.num_sanity_val_steps)
File "D:\GeneFacePlusPlus_py39\utils\commons\trainer.py", line 282, in evaluate
for batch_idx, batch in enumerate(pbar):
File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\tqdm\std.py", line 1182, in iter
for obj in iterable:
File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\torch\utils\data\dataloader.py", line 633, in next
data = self._next_data()
File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\torch\utils\data\dataloader.py", line 677, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\GeneFacePlusPlus_py39\tasks\radnerfs\dataset_utils.py", line 406, in getitem
bg_torso_img = bg_torso_img[..., :3] * bg_torso_img[..., 3:] + self.bg_img * (1 - bg_torso_img[..., 3:])
RuntimeError: The size of tensor a (3) must match the size of tensor b (0) at non-singleton dimension 3
'pkill' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

@Leesoon1984
Copy link

Traceback (most recent call last): File "D:\GeneFacePlusPlus_py39\utils\commons\trainer.py", line 240, in run_single_process self.train() File "D:\GeneFacePlusPlus_py39\utils\commons\trainer.py", line 320, in train self.evaluate(self.task, False, 'Sanity Val', max_batches=self.num_sanity_val_steps) File "D:\GeneFacePlusPlus_py39\utils\commons\trainer.py", line 282, in evaluate for batch_idx, batch in enumerate(pbar): File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\tqdm\std.py", line 1182, in iter for obj in iterable: File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\torch\utils\data\dataloader.py", line 633, in next data = self._next_data() File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\torch\utils\data\dataloader.py", line 677, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\GeneFacePlusPlus_py39\python\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\GeneFacePlusPlus_py39\tasks\radnerfs\dataset_utils.py", line 406, in getitem bg_torso_img = bg_torso_img[..., :3] * bg_torso_img[..., 3:] + self.bg_img * (1 - bg_torso_img[..., 3:]) RuntimeError: The size of tensor a (3) must match the size of tensor b (0) at non-singleton dimension 3 'pkill' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

你好,我也遇到了这个问题。请问解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants