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

预训练模型放置位置 #120

Open
cyc-aaa opened this issue Dec 4, 2024 · 3 comments
Open

预训练模型放置位置 #120

cyc-aaa opened this issue Dec 4, 2024 · 3 comments

Comments

@cyc-aaa
Copy link

cyc-aaa commented Dec 4, 2024

作者您好!我想问一下这个预训练模型应该放在哪个文件夹下呢?还有就是我想用我自己的数据集去训练出现了这个问题,您知道有方法解决嘛?问题如下Traceback (most recent call last):
File "train.py", line 319, in
main()
File "train.py", line 231, in main
for _, train_data in enumerate(train_loader):
File "/home/ubuntu/anaconda3/envs/irsde/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in next
data = self._next_data()
File "/home/ubuntu/anaconda3/envs/irsde/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 673, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/ubuntu/anaconda3/envs/irsde/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 55, in fetch
return self.collate_fn(data)
File "/home/ubuntu/anaconda3/envs/irsde/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 317, in default_collate
return collate(batch, collate_fn_map=default_collate_fn_map)
File "/home/ubuntu/anaconda3/envs/irsde/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 155, in collate
clone.update({key: collate([d[key] for d in batch], collate_fn_map=collate_fn_map) for key in elem})
File "/home/ubuntu/anaconda3/envs/irsde/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 155, in
clone.update({key: collate([d[key] for d in batch], collate_fn_map=collate_fn_map) for key in elem})
File "/home/ubuntu/anaconda3/envs/irsde/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 142, in collate
return collate_fn_map[elem_type](batch, collate_fn_map=collate_fn_map)
File "/home/ubuntu/anaconda3/envs/irsde/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 214, in collate_tensor_fn
return torch.stack(batch, 0, out=out)
RuntimeError: stack expects each tensor to be equal size, but got [3, 126, 128] at entry 0 and [3, 128, 128] at entry 1

@Algolzw
Copy link
Owner

Algolzw commented Dec 5, 2024

我通常是放在task目录下:如codes/config/deraining/pretrained_models/xxx.pth。看了下你的error应该是输入图像有小于128下28的,你可以试试使用更小的patch size。

@cyc-aaa
Copy link
Author

cyc-aaa commented Dec 6, 2024

尊敬的作者,还有个问题想问您一下 ,这个patch_size在哪个文件内是DIT_arch.py这个文件嘛,然后这个inpainting是相当于All-in-one的效果吗

@Algolzw
Copy link
Owner

Algolzw commented Dec 18, 2024

patch_size应该是option里面设置哈。

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