请问训练det_server模型时候可以使用混合精度? #13244
Unanswered
SonGohan757
asked this question in
Q&A
Replies: 1 comment
-
please refer to: https://github.com/PaddlePaddle/PaddleOCR/blob/main/doc/doc_en/detection_en.md#24-mixed-precision-training |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
训练指令:
python -m paddle.distributed.launch --gpus "0,1" tools/train.py -c configs/det/ch_PP-OCRv4/627_server_config.yaml -o Global.use_amp=True Global.use_dynamic_loss_scaling=True
我的config(已经消除敏感信息):
Global:
debug: false
use_gpu: true
epoch_num: 300
log_smooth_window: 20
print_batch_step: 10
save_model_dir: output/627_cf_hz_tl
save_epoch_step: 1
eval_batch_step:
cal_metric_during_train: false
checkpoints: null
pretrained_model: https://paddleocr.bj.bcebos.com/pretrained/ch_PP-OCRv4_det_server_trained.pdparams
save_inference_dir: null
use_visualdl: true
distributed: true
Architecture:
model_type: det
algorithm: DB
Transform: null
Backbone:
name: PPHGNet_small
det: true
Neck:
name: LKPAN
out_channels: 256
intracl: true
Head:
name: PFHeadLocal
k: 50
mode: large
Loss:
name: DBLoss
balance_loss: true
main_loss_type: DiceLoss
alpha: 5
beta: 10
ohem_ratio: 3
Optimizer:
name: Adam
beta1: 0.9
beta2: 0.999
lr:
name: Cosine
learning_rate: 0.00015
warmup_epoch: 5
regularizer:
name: L2
factor: 2e-6
PostProcess:
name: DBPostProcess
thresh: 0.3
box_thresh: 0.6
max_candidates: 1000
unclip_ratio: 2.0
Metric:
name: DetMetric
main_indicator: hmean
Train:
dataset:
name: TextDetDataset
data_dir:
label_file_list:
transforms:
img_mode: BGR
channel_first: false
- IaaAugment:
augmenter_args:
- type: Fliplr
args:
p: 0.5
- type: Affine
args:
rotate:
- -10
- 10
- type: Resize
args:
size:
- 0.5
- 3
loader:
shuffle: true
drop_last: true
batch_size_per_card: 8
num_workers: 2
use_shared_memory: false
Eval:
dataset:
name: TextDetDataset
data_dir:
label_file_list:
transforms:
- DecodeImage:
img_mode: BGR
channel_first: false
- DetLabelEncode: null
- DetResizeForTest:
resize_long: 2560
- NormalizeImage:
scale: 1./255.
mean:
- 0.485
- 0.456
- 0.406
std:
- 0.229
- 0.224
- 0.225
order: hwc
- ToCHWImage: null
- KeepKeys:
keep_keys:
- image
- shape
- polys
- ignore_tags
loader:
shuffle: false
drop_last: false
batch_size_per_card: 1
num_workers: 2
profiler_options: null
Beta Was this translation helpful? Give feedback.
All reactions