Open hexianbin1994 opened 1 year ago
做好数据处理等前置工作后,执行训练脚本 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
做好数据处理等前置工作后,执行训练脚本 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