未验证 提交 8a45b5e0 编写于 作者: T topduke 提交者: GitHub

Fix piecewise boundaries and droppath dtype (#8988)

* fix piecewise boundaries and droppath dtype

* fix tipc piecewise boundaries and droppath dtype
上级 306486e6
......@@ -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:
......
......@@ -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:
......
......@@ -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:
......
......@@ -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:
......
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'
......
......@@ -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
......
......@@ -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:
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册