PaddleSeg 训练报错 FatalError: Segmentation fault is detected by the operating system.

7rtdyuoh  于 2022-10-20  发布在  其他
关注(0)|答案(1)|浏览(452)

请提出你的问题 Please ask your question

C++ Traceback (most recent call last):

No stack trace in paddle, may be caused by external reasons.

Error Message Summary:

FatalError: Segmentation fault is detected by the operating system.
[TimeInfo:Aborted at 1665849747 (unix time) try "date -d @1665849747" if you are using GNU date]
[SignalInfo:SIGSEGV (@0x0) received by PID 8165 (TID 0x7f508c855700) from PID 0]

上方错误都是在训练一个PaddleSeg项目的时候出现的。用了两个类别,在图像(单通道)中只有0和1两个像素值。

config.yml如下:

batch_size: 8 # 配置批大小和迭代次数
iters: 5000

train_dataset: # 设置训练集路径,图像增强方法仅包含随机裁剪/缩放/调整明暗度和归一
  type: Dataset
  dataset_root: /home/aistudio/dataset/crack_segmentation_dataset
  train_path: /home/aistudio/dataset/crack_segmentation_dataset/train.txt
  num_classes: 2
  mode: train
  transforms:
    - type: RandomPaddingCrop
      crop_size: [488, 488]
    - type: Resize
      target_size: [488, 488]
    - type: RandomHorizontalFlip
    - type: RandomDistort
      brightness_range: 0.5
      contrast_range: 0.5
      saturation_range: 0.5
    - type: Normalize

val_dataset: # 设置验证集
  type: Dataset
  dataset_root: /home/aistudio/dataset/crack_segmentation_dataset
  val_path: /home/aistudio/dataset/crack_segmentation_dataset/val.txt
  num_classes: 2
  mode: val
  transforms:
    - type: Normalize

optimizer: # 设置优化器
  type: sgd
  momentum: 0.9
  weight_decay: 4.0e-5

lr_scheduler: # 设置学习率
  type: PolynomialDecay
  learning_rate: 0.01
  end_lr: 0
  power: 0.9

loss: # 使用交叉熵损失
  types:
    - type: CrossEntropyLoss
  coef: [1, 1, 1]

model: # 选择模型为PPLiteSeg
  type: PPLiteSeg
  backbone:
    type: STDC2
    pretrained: https://bj.bcebos.com/paddleseg/dygraph/PP_STDCNet2.tar.gz
  # pretrained: ./output/best_model/model.pdparams # 想要从自己训练好的模型进行训练取消注解即可
7lrncoxx

7lrncoxx1#

没有详细报错信息,无法看出具体错误。
建议先参考paddleseg的文档,把quick start执行一下,检查安装的环境是否ok。估计是环境安装问题

相关问题