diff --git a/PaddleSlim/docs/demo.md b/PaddleSlim/docs/demo.md index a810ab02a9b7514e26e15b7f0cb71a4859cbd4fc..0ea07eaf9c792687642bfd699ea0db9afafca871 100644 --- a/PaddleSlim/docs/demo.md +++ b/PaddleSlim/docs/demo.md @@ -377,9 +377,9 @@ step9: 执行 `sh run.sh` 进行训练任务。 | - | Latency | Top1/Top5 accuracy | GPU cost | token | |---------------|---------|--------------------|---------------------|--------| | MobileNetV2 | 0% | 71.90% / 90.55% | - | - | -| RK3288 开发板 | -23% | 71.97% / 90.35% | 1.2K GPU hours(V100) | token2 | +| RK3288 开发板 | -22% | 71.97% / 90.35% | 1.2K GPU hours(V100) | token2 | | Android 手机 | -20% | 72.06% / 90.36% | 1.2K GPU hours(V100) | token3 | -| iPhone 手机 | -17% | 72.22% / 90.47% | 1.2K GPU hours(V100) | token4 | +| iPhone 手机 | -16% | 72.22% / 90.47% | 1.2K GPU hours(V100) | token4 | | token name | tokens | @@ -388,4 +388,4 @@ step9: 执行 `sh run.sh` 进行训练任务。 | tokens1 | [3, 1, 1, 0, 1, 0, 3, 2, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 2, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1] | | tokens2 | [0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 2, 2, 1, 0, 1, 1, 2, 1, 0, 0, 0, 0, 3, 2, 1, 0, 1, 0] | | tokens3 | [3, 0, 0, 0, 1, 0, 1, 2, 0, 0, 1, 0, 0, 2, 0, 1, 1, 0, 3, 1, 0, 1, 1, 0, 0, 2, 1, 1, 1, 0] | -| tokens4 | [3, 1, 1, 0, 0, 0, 3, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 3, 0, 1, 0, 1, 1, 2, 1, 1, 0, 1, 0] | +| tokens4 | [3, 1, 0, 0, 1, 0, 3, 1, 1, 0, 1, 0, 3, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 3, 1, 1, 0, 1, 0] | diff --git a/PaddleSlim/light_nas/light_nas_space.py b/PaddleSlim/light_nas/light_nas_space.py index 9506269612c554250714813b0455453565fdf2eb..f87541384eade0f1796ed7ac410deaf1e54ed2de 100644 --- a/PaddleSlim/light_nas/light_nas_space.py +++ b/PaddleSlim/light_nas/light_nas_space.py @@ -23,11 +23,11 @@ import reader from get_ops_from_program import get_ops_from_program total_images = 1281167 -lr = 0.016 -num_epochs = 350 +lr = 0.1 +num_epochs = 240 batch_size = 512 -lr_strategy = "exponential_decay_with_RMSProp" -l2_decay = 1e-5 +lr_strategy = "cosine_decay" +l2_decay = 4e-5 momentum_rate = 0.9 image_shape = [3, 224, 224] class_dim = 1000 @@ -195,6 +195,10 @@ def get_all_ops(ifshortcut=True, ifse=True, strides=[1, 2, 2, 2, 1, 2, 1]): # fc, converted to 1x1 conv op_params.append(('conv', 0, 0, 1, 1280, 1, 1, class_dim, 1, 1, 0, 1, 1)) op_params.append(('eltwise', 2, 1, 1000, 1, 1)) + + op_params.append(('softmax', -1, 1, 1000, 1, 1)) + op_params.append(('eltwise', 1, 1, 1, 1, 1)) + op_params.append(('eltwise', 2, 1, 1, 1, 1)) return list(set(op_params))