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

第二阶段训练的问题, #21

Open
StayNightShip opened this issue May 14, 2024 · 0 comments
Open

第二阶段训练的问题, #21

StayNightShip opened this issue May 14, 2024 · 0 comments

Comments

@StayNightShip
Copy link

{C9ED4987-FDB8-4fac-810D-945AD847E156}
我已经按照文档要求构造了数据集,个人觉得已经满足文档所需要求构造数据。但是一直出现这个问题。不明白是什么情况

Traceback (most recent call last):
File "train.py", line 220, in
main()
File "train.py", line 216, in main
train(args, cfg)
File "train.py", line 209, in train
trainer.train(trn_loader, st_step, cfg["iter"], component_objects, chars_sim_dict)
File "/root/autodl-tmp/VQ-Font/trainer/combined_trainer.py", line 79, in train
out_1, style_components_1 = self.gen.read_decode(trg_style_ids, trg_sample_index,
File "/root/autodl-tmp/VQ-Font/model/generator.py", line 75, in read_decode
content_feats = self.content_encoder(content_imgs) # 目标内容图片[B,C,H,W]
File "/root/miniconda3/envs/VQ/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/root/autodl-tmp/VQ-Font/model/content_encoder.py", line 17, in forward
out = self.net(x)
File "/root/miniconda3/envs/VQ/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/root/miniconda3/envs/VQ/lib/python3.8/site-packages/torch/nn/modules/container.py", line 204, in forward
input = module(input)
File "/root/miniconda3/envs/VQ/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/root/autodl-tmp/VQ-Font/model/modules/blocks.py", line 103, in forward
x = self.conv(self.pad(x))
File "/root/miniconda3/envs/VQ/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/root/miniconda3/envs/VQ/lib/python3.8/site-packages/torch/nn/modules/padding.py", line 178, in forward
return F.pad(input, self.padding, 'reflect')
RuntimeError: Padding size should be less than the corresponding input dimension, but got: padding (1, 1) at dimension 1 of input [1024, 1, 128]

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

1 participant