Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • PaddleOCR
  • Issue
  • #801

P
PaddleOCR
  • 项目概览

PaddlePaddle / PaddleOCR
大约 2 年 前同步成功

通知 1557
Star 32965
Fork 6643
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 108
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 7
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
PaddleOCR
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 108
    • Issue 108
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 7
    • 合并请求 7
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 9月 22, 2020 by saxon_zh@saxon_zhGuest

resnet34_fpn_srn 报错

Created by: FieldRen

将rec_r50fpn_vd_none_srn.yml中的layers改成34

报错: Traceback (most recent call last): File "tools/train.py", line 123, in main() File "tools/train.py", line 50, in main config, train_program, startup_program, mode='train') File "/ssd2/exec/renzh/repos/PaddleOCR/tools/program.py", line 170, in build dataloader, outputs = model(mode=mode) File "/ssd2/exec/renzh/repos/PaddleOCR/ppocr/modeling/architectures/rec_model.py", line 193, in call conv_feas = self.backbone(inputs) File "/ssd2/exec/renzh/repos/PaddleOCR/ppocr/modeling/backbones/rec_resnet_fpn.py", line 105, in call name=conv_name) TypeError: basic_block() got an unexpected keyword argument 'if_first'

应该是rec_resnet_fpn.py +105行变量名写错了,将if_first改成is_first,又报错:


Error Message Summary:

InvalidArgumentError: The 3-th dimension of input[0] and input[1] is expected to be equal.But received input[0]'s shape = [-1, 256, 4, 640], input[1]'s shape = [-1, 256, 4, 320]. [Hint: Expected inputs_dims[0][j] == inputs_dims[i][j], but received inputs_dims[0][j]:640 != inputs_dims[i][j]:320.] at (/paddle/paddle/fluid/operators/concat_op.h:63) [operator < concat > error]

我的配置:

Global: algorithm: SRN use_gpu: true epoch_num: 72 log_smooth_window: 20 print_batch_step: 10 save_model_dir: output/rec_offline_r34_srn save_epoch_step: 1 eval_batch_step: 50000 train_batch_size_per_card: 24 test_batch_size_per_card: 24 image_shape: [1, 32, 640] max_text_length: 100 character_type: ch use_space_char: true character_dict_path: ./ppocr/utils/offline_dict.txt loss_type: srn num_heads: 8 average_window: 0.15 max_average_window: 15625 min_average_window: 10000 reader_yml: ./configs/rec/rec_offline_reader.yml pretrain_weights: checkpoints: save_inference_dir: infer_img:

Architecture: function: ppocr.modeling.architectures.rec_model,RecModel

Backbone: function: ppocr.modeling.backbones.rec_resnet_fpn,ResNet layers: 34

Head: function: ppocr.modeling.heads.rec_srn_all_head,SRNPredict encoder_type: rnn num_encoder_TUs: 2 num_decoder_TUs: 4 hidden_dims: 512 SeqRNN: hidden_size: 256

Loss: function: ppocr.modeling.losses.rec_srn_loss,SRNLoss

Optimizer: function: ppocr.optimizer,AdamDecay base_lr: 0.0001 beta1: 0.9 beta2: 0.999

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/PaddleOCR#801
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7