You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
X-MingYang
changed the title
在AI studio别人的公开项目的基础上,改动配置文件来使用自建数据集进行训练,发生‘metaclass conflic’t错误
在AI studio别人的公开项目的基础上,改动配置文件来使用自建数据集进行训练,发生‘metaclass conflict‘错误
Mar 16, 2024
问题确认 Search before asking
请提出你的问题 Please ask your question
原项目链接:https://aistudio.baidu.com/projectdetail/2089732?channelType=0&channel=0
本人数据集按照官方文档进行搭建:
https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.9/docs/data/transform/transform_cn.md
对于配置文件只改动了【num_classes】、【dataset_root】、【train_path】、【val_path】。发生报错如图所示
##本人改动过的ocrnet_dlrsd.yml
base: './configs/base/dlrsd.yml'
batch_size: 2
iters: 160000
model:
type: OCRNet
backbone:
type: HRNet_W18
pretrained: https://bj.bcebos.com/paddleseg/dygraph/hrnet_w18_ssld.tar.gz
num_classes: 2
backbone_indices: [0]
optimizer:
type: sgd
lr_scheduler:
type: PolynomialDecay
learning_rate: 0.01
power: 0.9
loss:
types:
- type: CrossEntropyLoss
- type: CrossEntropyLoss
coef: [1, 0.4]
##本人改动过的dlrsd.yml
batch_size: 2
iters: 80000
train_dataset:
type: Dataset
dataset_root: home/aistudio/data/labeldata/labeldata
train_path: home/aistudio/data/labeldata/labeldata/train.txt
num_classes: 20
transforms:
- type: ResizeStepScaling
min_scale_factor: 0.5
max_scale_factor: 2.0
scale_step_size: 0.25
- type: RandomPaddingCrop
crop_size: [640, 640]
- type: RandomHorizontalFlip
- type: Normalize
mode: train
val_dataset:
type: Dataset
dataset_root: home/aistudio/data/labeldata/labeldata
val_path: home/aistudio/data/labeldata/labeldata/val.txt
num_classes: 20
transforms:
- type: Normalize
mode: val
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]
原项目中的对应配置文件如下:
##原项目中的ocrnet_dlrsd.yml
base: './configs/base/dlrsd.yml'
batch_size: 2
iters: 160000
model:
type: OCRNet
backbone:
type: HRNet_W18
pretrained: https://bj.bcebos.com/paddleseg/dygraph/hrnet_w18_ssld.tar.gz
num_classes: 18
backbone_indices: [0]
optimizer:
type: sgd
lr_scheduler:
type: PolynomialDecay
learning_rate: 0.01
power: 0.9
loss:
types:
- type: CrossEntropyLoss
- type: CrossEntropyLoss
coef: [1, 0.4]
##原项目中的dlrsd.yml
batch_size: 2
iters: 80000
train_dataset:
type: Dataset
dataset_root: dataset/dlrsd
train_path: dataset/dlrsd/train.txt
num_classes: 18
transforms:
- type: ResizeStepScaling
min_scale_factor: 0.5
max_scale_factor: 2.0
scale_step_size: 0.25
- type: RandomPaddingCrop
crop_size: [256, 256]
- type: RandomHorizontalFlip
- type: Normalize
mode: train
val_dataset:
type: Dataset
dataset_root: dataset/dlrsd
val_path: dataset/dlrsd/val.txt
num_classes: 18
transforms:
- type: Normalize
- type: Resize
target_size: [256, 256]
mode: val
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]
万望各位大佬指点一二!
The text was updated successfully, but these errors were encountered: