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

模型输入tensor的尺寸不对 #16

Open
hexianbin1994 opened this issue Sep 22, 2023 · 0 comments
Open

模型输入tensor的尺寸不对 #16

hexianbin1994 opened this issue Sep 22, 2023 · 0 comments

Comments

@hexianbin1994
Copy link

做好数据处理等前置工作后,执行训练脚本 python train.py --cfg OWN_config.yaml 提示模型尺寸不正确,示例代码train.py 中构建的三种模型都不正确,如何约束这个尺寸问题?

下面展示各个模型的错误:
1 -- build_lprnet
model = build_lprnet(num_classes=len(plate_chr))
错误为:RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[32, 1, 32, 160] to have 3 channels, but got 1 channels instead
2 -- myNet_ocr
model = myNet_ocr(num_classes=len(plate_chr),cfg=cfg)
错误为:RuntimeError: Given groups=1, weight of size [32, 3, 5, 5], expected input[32, 1, 32, 160] to have 3 channels, but got 1 channels instead
3 -- crnn
model = crnn.get_crnn(config,cfg=cfg)
错误为:RuntimeError: Given groups=1, weight of size [32, 3, 5, 5], expected input[32, 1, 32, 160] to have 3 channels, but got 1 channels instead

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