From c4413315a1187fe65df22c480a00c780a60a839f Mon Sep 17 00:00:00 2001 From: linqingke <linqingke@huawei.com> Date: Thu, 14 Oct 2021 14:16:44 +0800 Subject: [PATCH] update benchmark network. --- .../cv/resnet/config/resnet50_imagenet2012_Boost_config.yaml | 4 ++-- official/nlp/bert/src/dataset.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/official/cv/resnet/config/resnet50_imagenet2012_Boost_config.yaml b/official/cv/resnet/config/resnet50_imagenet2012_Boost_config.yaml index 862cb8d4c..676dfd297 100644 --- a/official/cv/resnet/config/resnet50_imagenet2012_Boost_config.yaml +++ b/official/cv/resnet/config/resnet50_imagenet2012_Boost_config.yaml @@ -23,7 +23,7 @@ batch_size: 256 loss_scale: 1024 momentum: 0.85 weight_decay: 5.0e-5 -epoch_size: 38 +epoch_size: 45 pretrain_epoch_size: 0 save_checkpoint: False save_checkpoint_epochs: 5 @@ -33,7 +33,7 @@ lr_decay_mode: "poly" use_label_smooth: True label_smooth_factor: 0.1 lr_init: 0 -lr_max: 13.96 +lr_max: 13.01 lr_end: 0.0 lars_epsilon: 0.0 lars_coefficient: 0.001 diff --git a/official/nlp/bert/src/dataset.py b/official/nlp/bert/src/dataset.py index 03e931539..db8ed35f7 100644 --- a/official/nlp/bert/src/dataset.py +++ b/official/nlp/bert/src/dataset.py @@ -41,7 +41,7 @@ class BucketDatasetGenerator: bucket_size = len(bucket_list) self.random_list = np.random.binomial(n=(bucket_size - 1), p=0.5, size=self.__len__()) self.random_list = (self.random_list + 2) % bucket_size - self.random_list = (self.random_list + 1) * bucket_list[0] + self.random_list = [bucket_list[i] for i in self.random_list] self.iter = 0 def __next__(self): -- GitLab