From d5c3e96fa5d2d77bc9a63571ebf9b0884e2eb7c8 Mon Sep 17 00:00:00 2001 From: jiangzhenguang Date: Wed, 21 Apr 2021 18:49:26 +0800 Subject: [PATCH] fix resnet --- model_zoo/official/cv/resnet/README.md | 2 +- model_zoo/official/cv/resnet/README_CN.md | 2 +- model_zoo/official/cv/resnet/train.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model_zoo/official/cv/resnet/README.md b/model_zoo/official/cv/resnet/README.md index 7a4df0c0fc..d13c7fca25 100644 --- a/model_zoo/official/cv/resnet/README.md +++ b/model_zoo/official/cv/resnet/README.md @@ -449,7 +449,7 @@ Evaluation result will be stored in the example path, whose folder name is "eval - Evaluating ResNet18 with CIFAR-10 dataset ```bash -result: {'acc': 0.9402043269230769} ckpt=~/resnet50_cifar10/train_parallel0/resnet-90_195.ckpt +result: {'acc': 0.9363061543521088} ckpt=~/resnet50_cifar10/train_parallel0/resnet-90_195.ckpt ``` - Evaluating ResNet18 with ImageNet2012 dataset diff --git a/model_zoo/official/cv/resnet/README_CN.md b/model_zoo/official/cv/resnet/README_CN.md index fdaf087f97..98e5428c4c 100755 --- a/model_zoo/official/cv/resnet/README_CN.md +++ b/model_zoo/official/cv/resnet/README_CN.md @@ -416,7 +416,7 @@ bash run_eval_gpu.sh [resnet50|resnet101] [cifar10|imagenet2012] [DATASET_PATH] - 使用CIFAR-10数据集评估ResNet18 ```bash -result: {'acc': 0.9402043269230769} ckpt=~/resnet50_cifar10/train_parallel0/resnet-90_195.ckpt +result: {'acc': 0.9363061543521088} ckpt=~/resnet50_cifar10/train_parallel0/resnet-90_195.ckpt ``` - 使用ImageNet2012数据集评估ResNet18 diff --git a/model_zoo/official/cv/resnet/train.py b/model_zoo/official/cv/resnet/train.py index 2076924fa7..743118b70d 100755 --- a/model_zoo/official/cv/resnet/train.py +++ b/model_zoo/official/cv/resnet/train.py @@ -207,7 +207,7 @@ if __name__ == '__main__': metrics = {"acc"} if args_opt.run_distribute: metrics = {'acc': DistAccuracy(batch_size=config.batch_size, device_num=args_opt.device_num)} - if (args_opt.net != "resnet101" and args_opt.net != "resnet50") or \ + if (args_opt.net not in ("resnet18", "resnet50", "resnet101")) or \ args_opt.parameter_server or target == "CPU": ## fp32 training model = Model(net, loss_fn=loss, optimizer=opt, metrics=metrics, eval_network=dist_eval_network)