Giter VIP home page Giter VIP logo

Comments (4)

13950182204 avatar 13950182204 commented on September 20, 2024

batch_size: 64 #设定batch_size的值即为迭代一次送入网络的图片数量,一般显卡显存越大,batch_size的值可以越大。如果使用多卡训练,总得batch size等于该batch size乘以卡数。
iters: 10000 #模型训练迭代的轮数

train_dataset: #训练数据设置
type: Dataset #指定加载数据集的类。数据集类的代码在PaddleSeg/paddleseg/datasets目录下。
dataset_root: /home/aistudio/data/carlane/
train_path: /home/aistudio/data/carlane/train_list.txt #数据集中用于训练的标识文件
num_classes: 7 #指定类别个数(背景也算为一类)
mode: train #表示用于训练
transforms:
- type: ResizeStepScaling
min_scale_factor: 0.5
max_scale_factor: 2.0
scale_step_size: 0.25
- type: RandomPaddingCrop
crop_size: [512, 512]
- type: RandomHorizontalFlip
- type: RandomDistort
brightness_range: 0.5
contrast_range: 0.5
saturation_range: 0.5
- type: Normalize
mode: train

val_dataset: #验证数据设置
type: Dataset #指定加载数据集的类。数据集类的代码在PaddleSeg/paddleseg/datasets目录下。
dataset_root: /home/aistudio/data/carlane/ #数据集路径
val_path: /home/aistudio/data/carlane/val_list.txt #数据集中用于验证的标识文件
num_classes: 7 #指定类别个数(背景也算为一类)
mode: val #表示用于验证
transforms: #模型验证的数据预处理的方式
- type: Normalize #对原始图像进行归一化,标注图像保持不变

optimizer:
type: AdamW
weight_decay: 0.01

lr_scheduler:
type: PolynomialDecay
learning_rate: 0.01
end_lr: 0
power: 0.9

loss:
types:
- type: OhemCrossEntropyLoss
min_kept: 130000 # batch_size * 1024 * 512 // 16
- type: OhemCrossEntropyLoss
min_kept: 130000
- type: OhemCrossEntropyLoss
min_kept: 130000
coef: [1, 1, 1]

model:
type: PPLiteSeg
num_classes: 7
backbone:
type: STDC1
pretrained: https://bj.bcebos.com/paddleseg/dygraph/PP_STDCNet1.tar.gz
arm_out_chs: [32, 64, 128]
seg_head_inter_chs: [32, 64, 64]
这个是 在paddleseg 上训练的yml

from paddle2onnx.

13950182204 avatar 13950182204 commented on September 20, 2024

! python tools/export.py
--config ../DeeplabV3.yml
--model_path output/iter_100/model.pdparams
--input_shape -1 3 512 512
!paddle2onnx --model_dir ./output/inference_model/
--model_filename model.pdmodel
--params_filename model.pdiparams
--save_file segonnx/model.onnx
--opset_version 12
--enable_dev_version True
!python -m paddle2onnx.optimize --input_model segonnx/model.onnx
--output_model segonnx/PP_seg.onnx
--input_shape_dict "{'x':[1,3,512,512]}"

from paddle2onnx.

13950182204 avatar 13950182204 commented on September 20, 2024

model (2)
这个是输出paddle 输出的模型也是固定的shape最后输出还是有问题

from paddle2onnx.

1314520gu avatar 1314520gu commented on September 20, 2024

请问解决了吗

from paddle2onnx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.