From: @jiangzg001
Reviewed-by: @oacjiewen,@wuxuejian
Signed-off-by: @wuxuejian
This commit is contained in:
mindspore-ci-bot 2021-04-22 15:37:46 +08:00 committed by Gitee
commit ed8ae07062
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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)