diff --git a/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml b/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml index 427255738696d8e6a073829350c40b00ef30115f..afa012b607eec2c223c94d2d0b09fbf4b2704f1b 100644 --- a/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml +++ b/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml @@ -27,7 +27,7 @@ Optimizer: beta2: 0.999 lr: name: Piecewise - decay_epochs : [700, 800] + decay_epochs : [700] values : [0.0005, 0.00005] warmup_epoch: 5 regularizer: diff --git a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml index e2aa50106ff60aa61858a22ba6fdd03b8cd04d85..793bb5c91da2e3d53cda76f0c85889d6529e6c59 100644 --- a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml +++ b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml @@ -27,7 +27,7 @@ Optimizer: beta2: 0.999 lr: name: Piecewise - decay_epochs : [700, 800] + decay_epochs : [700] values : [0.001, 0.0001] warmup_epoch: 5 regularizer: diff --git a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml index 9bddcb29ede5891a836741d0a49ee04c4dfe8ca5..3855005cc391ef84f8e036fdd36a082e68b810f4 100644 --- a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml +++ b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml @@ -28,7 +28,7 @@ Optimizer: beta2: 0.999 lr: name: Piecewise - decay_epochs : [700, 800] + decay_epochs : [700] values : [0.001, 0.0001] warmup_epoch: 5 regularizer: diff --git a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_enhanced_ctc_loss.yml b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_enhanced_ctc_loss.yml index 5be96969fd0d4912a4ff2a09c9d181b1b17d633e..ef0e893faee5333beb4838d5dbfde96efbe5e7f8 100644 --- a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_enhanced_ctc_loss.yml +++ b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_enhanced_ctc_loss.yml @@ -27,7 +27,7 @@ Optimizer: beta2: 0.999 lr: name: Piecewise - decay_epochs : [700, 800] + decay_epochs : [700] values : [0.001, 0.0001] warmup_epoch: 5 regularizer: diff --git a/configs/rec/rec_resnet_stn_bilstm_att.yml b/configs/rec/rec_resnet_stn_bilstm_att.yml index 0bb90b35264b424c58a45685f5a2a066843298a6..20ed9533c2bde761b0d28391b631c9487ca70f91 100644 --- a/configs/rec/rec_resnet_stn_bilstm_att.yml +++ b/configs/rec/rec_resnet_stn_bilstm_att.yml @@ -1,6 +1,6 @@ Global: use_gpu: True - epoch_num: 400 + epoch_num: 6 log_smooth_window: 20 print_batch_step: 10 save_model_dir: ./output/rec/seed @@ -27,7 +27,7 @@ Optimizer: momentum: 0.9 lr: name: Piecewise - decay_epochs: [4,5,8] + decay_epochs: [4, 5] values: [1.0, 0.1, 0.01] regularizer: name: 'L2' diff --git a/ppocr/modeling/backbones/rec_svtrnet.py b/ppocr/modeling/backbones/rec_svtrnet.py index c2c07f4476929d49237c8e9a10713f881f5f556b..de5920c633b27b8284793072315d8105de638017 100644 --- a/ppocr/modeling/backbones/rec_svtrnet.py +++ b/ppocr/modeling/backbones/rec_svtrnet.py @@ -32,7 +32,7 @@ def drop_path(x, drop_prob=0., training=False): """ if drop_prob == 0. or not training: return x - keep_prob = paddle.to_tensor(1 - drop_prob) + keep_prob = paddle.to_tensor(1 - drop_prob, dtype=x.dtype) shape = (paddle.shape(x)[0], ) + (1, ) * (x.ndim - 1) random_tensor = keep_prob + paddle.rand(shape, dtype=x.dtype) random_tensor = paddle.floor(random_tensor) # binarize diff --git a/test_tipc/configs/ch_PP-OCRv2_rec/ch_PP-OCRv2_rec_distillation.yml b/test_tipc/configs/ch_PP-OCRv2_rec/ch_PP-OCRv2_rec_distillation.yml index 3eb82d42bc3f2b3ca7420d999865977bbad09e31..43e14b84d77a216ef949e2af14a01b65bb350b54 100644 --- a/test_tipc/configs/ch_PP-OCRv2_rec/ch_PP-OCRv2_rec_distillation.yml +++ b/test_tipc/configs/ch_PP-OCRv2_rec/ch_PP-OCRv2_rec_distillation.yml @@ -27,7 +27,7 @@ Optimizer: beta2: 0.999 lr: name: Piecewise - decay_epochs : [700, 800] + decay_epochs : [700] values : [0.001, 0.0001] warmup_epoch: 5 regularizer: diff --git a/test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml b/test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml index 4c8ba0a6fa4a355e9bad1665a8de82399f919740..8150d95e334a242fb25e9a9d9397ac4ff6a3de74 100644 --- a/test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml +++ b/test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml @@ -27,7 +27,7 @@ Optimizer: beta2: 0.999 lr: name: Piecewise - decay_epochs : [700, 800] + decay_epochs : [700] values : [0.0005, 0.00005] warmup_epoch: 5 regularizer: