Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • PaddleDetection
  • Issue
  • #1325

P
PaddleDetection
  • 项目概览

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

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

pp-yolo训练自定义数据集出现tensor is not initialized错误

Created by: muzinicemoon

python -u tools/train.py -c configs/ppyolo/ppyolo.yml --eval 报错信息如下:

2020-08-31 17:17:48,609-INFO: If regularizer of a Parameter has been set by 'fluid.ParamAttr' or 'fluid.WeightNormParamAttr' already. The Regularization[L2Decay, regularization_coeff=0.000500] in Optimizer will not take effect, and it will only be applied to other
 Parameters!
2020-08-31 17:17:59,541-INFO: places would be ommited when DataLoader is not iterable
W0831 17:17:59.633438   872 device_context.cc:252] Please NOTE: device: 0, CUDA Capability: 52, Driver API Version: 11.0, Runtime API Version: 10.0
W0831 17:17:59.649430   872 device_context.cc:260] device: 0, cuDNN Version: 7.6.
2020-08-31 17:18:01,831-WARNING: D:\ResNet50_vd_ssld_pretrained.pdparams not found, try to load model file saved with [ save_params, save_persistables, save_vars ]
D:\anaconda2\envs\py3\lib\site-packages\paddle\fluid\io.py:1998: UserWarning: This list is not set, Because of Paramerter not found in program. There are: fc_0.b_0 fc_0.w_0
  format(" ".join(unused_para_list)))
2020-08-31 17:18:05,968-INFO: places would be ommited when DataLoader is not iterable
W0831 17:18:06.056457   872 build_strategy.cc:170] fusion_group is not enabled for Windows/MacOS now, and only effective when running with CUDA GPU.
D:\anaconda2\envs\py3\lib\site-packages\paddle\fluid\executor.py:1070: UserWarning: The following exception is not an EOF exception.
  "The following exception is not an EOF exception.")
Traceback (most recent call last):
  File "tools/train.py", line 370, in <module>
    main()
  File "tools/train.py", line 243, in main
    outs = exe.run(compiled_train_prog, fetch_list=train_values)
  File "D:\anaconda2\envs\py3\lib\site-packages\paddle\fluid\executor.py", line 1071, in run
    six.reraise(*sys.exc_info())
  File "D:\anaconda2\envs\py3\lib\site-packages\six.py", line 703, in reraise
    raise value
  File "D:\anaconda2\envs\py3\lib\site-packages\paddle\fluid\executor.py", line 1066, in run
    return_merged=return_merged)
  File "D:\anaconda2\envs\py3\lib\site-packages\paddle\fluid\executor.py", line 1167, in _run_impl
    return_merged=return_merged)
  File "D:\anaconda2\envs\py3\lib\site-packages\paddle\fluid\executor.py", line 879, in _run_parallel
    tensors = exe.run(fetch_var_names, return_merged)._move_to_list()
paddle.fluid.core_avx.EnforceNotMet:

--------------------------------------------
C++ Call Stacks (More useful to developers):
--------------------------------------------
Windows not support stack backtrace yet.

------------------------------------------
Python Call Stacks (More useful to users):
------------------------------------------
  File "D:\anaconda2\envs\py3\lib\site-packages\paddle\fluid\framework.py", line 2610, in append_op
    attrs=kwargs.get("attrs", None))
  File "D:\anaconda2\envs\py3\lib\site-packages\paddle\fluid\layer_helper.py", line 43, in append_op
    return self.main_program.current_block().append_op(*args, **kwargs)
  File "D:\anaconda2\envs\py3\lib\site-packages\paddle\fluid\layers\nn.py", line 9949, in crop
    attrs=None if len(attrs) == 0 else attrs)
  File "D:\2020-projects\PaddleDetection\ppdet\modeling\losses\iou_loss.py", line 207, in _bbox_transform
    anchor_h = fluid.layers.crop(x=anchor_h_max, shape=dcx)
  File "D:\2020-projects\PaddleDetection\ppdet\modeling\losses\iou_aware_loss.py", line 73, in __call__
    batch_size, True, scale_x_y, eps)
  File "D:\2020-projects\PaddleDetection\ppdet\modeling\losses\yolo_loss.py", line 183, in _get_fine_grained_loss
    self._batch_size, scale_x_y)
  File "D:\2020-projects\PaddleDetection\ppdet\modeling\losses\yolo_loss.py", line 69, in __call__
    mask_anchors, self._ignore_thresh)
  File "D:\2020-projects\PaddleDetection\ppdet\modeling\anchor_heads\yolo_head.py", line 394, in get_loss
    self.prefix_name)
  File "D:\2020-projects\PaddleDetection\ppdet\modeling\architectures\yolo.py", line 85, in build
    gt_score, targets)
  File "D:\2020-projects\PaddleDetection\ppdet\modeling\architectures\yolo.py", line 159, in train
    return self.build(feed_vars, mode='train')
  File "tools/train.py", line 116, in main
    train_fetches = model.train(feed_vars)
  File "tools/train.py", line 370, in <module>
    main()

----------------------
Error Message Summary:
----------------------
InvalidArgumentError: The Tensor in the crop Op's Input Variable X(create_parameter_47.w_0) is not initialized.
  [Hint: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1.] at (D:\1.8.4\paddle\paddle\fluid\framework\operator.cc:1289)
  [operator < crop > error]
`
附上ppyolo_reader.yml代码

`TrainReader:
  inputs_def:
    fields: ['image', 'gt_bbox', 'gt_class', 'gt_score']
    num_max_boxes: 50
  dataset:
    !VOCDataSet
      anno_path: trainval.txt
      dataset_dir: dataset/dust
      use_default_label: false
      with_background: false
  sample_transforms:
    - !DecodeImage
      to_rgb: True
      with_mixup: True
    - !MixupImage
      alpha: 1.5
      beta: 1.5
    - !ColorDistort {}
    - !RandomExpand
      fill_value: [123.675, 116.28, 103.53]
    - !RandomCrop {}
    - !RandomFlipImage
      is_normalized: false
    - !NormalizeBox {}
    - !PadBox
      num_max_boxes: 50
    - !BboxXYXY2XYWH {}
  batch_transforms:
  - !RandomShape
    sizes: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608]
    random_inter: True
  - !NormalizeImage
    mean: [0.485, 0.456, 0.406]
    std: [0.229, 0.224, 0.225]
    is_scale: True
    is_channel_first: false
  - !Permute
    to_bgr: false
    channel_first: True
  # Gt2YoloTarget is only used when use_fine_grained_loss set as true,
  # this operator will be deleted automatically if use_fine_grained_loss
  # is set as false
  - !Gt2YoloTarget
    anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]]
    anchors: [[10, 13], [16, 30], [33, 23],
              [30, 61], [62, 45], [59, 119],
              [116, 90], [156, 198], [373, 326]]
    downsample_ratios: [32, 16, 8]
  batch_size: 2
  shuffle: true
  mixup_epoch: 150
  drop_last: true
  worker_num: 1
  bufsize: 4
  use_process: true

EvalReader:
  inputs_def:
    fields: ['image', 'im_size', 'im_id']
    num_max_boxes: 50
  dataset:
    !VOCDataSet
      dataset_dir: dataset/dust
      anno_path: test.txt
      use_default_label: false
      with_background: false
  sample_transforms:
    - !DecodeImage
      to_rgb: True
    - !ResizeImage
      target_size: 608
      interp: 2
    - !NormalizeImage
      mean: [0.485, 0.456, 0.406]
      std: [0.229, 0.224, 0.225]
      is_scale: True
      is_channel_first: false
    - !PadBox
      num_max_boxes: 50
    - !Permute
      to_bgr: false
      channel_first: True
  batch_size: 2
  drop_empty: false
  worker_num: 1
  bufsize: 4
指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/PaddleDetection#1325
渝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