forked from mindspore-Ecosystem/mindspore
!15483 fix resnet
From: @jiangzg001 Reviewed-by: @oacjiewen,@wuxuejian Signed-off-by: @wuxuejian
This commit is contained in:
commit
ed8ae07062
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue