!16096 fix ssd and mobilenet_v1 issue

From: @jiangzg001
Reviewed-by: @wuxuejian,@c_34
Signed-off-by: @wuxuejian
This commit is contained in:
mindspore-ci-bot 2021-05-10 11:32:12 +08:00 committed by Gitee
commit dbce7882dd
2 changed files with 3 additions and 4 deletions

View File

@ -143,8 +143,8 @@ You can start training using python or shell scripts.If the train method is trai
```shell
# eval example
python:
Ascend: python eval.py --dataset [cifar10|imagenet2012] --dataset_path [VAL_DATASET_PATH] --pretrain_ckpt [CHECKPOINT_PATH]
CPU: python eval.py --dataset [cifar10|imagenet2012] --dataset_path [VAL_DATASET_PATH] --pretrain_ckpt [CHECKPOINT_PATH] --device_target CPU
Ascend: python eval.py --dataset [cifar10|imagenet2012] --dataset_path [VAL_DATASET_PATH] --checkpoint_path [CHECKPOINT_PATH]
CPU: python eval.py --dataset [cifar10|imagenet2012] --dataset_path [VAL_DATASET_PATH] --checkpoint_path [CHECKPOINT_PATH] --device_target CPU
shell:
Ascend: sh run_eval.sh [cifar10|imagenet2012] [DATASET_PATH] [CHECKPOINT_PATH]

View File

@ -134,7 +134,6 @@ class InvertedResidual(nn.Cell):
_bn(oup),
])
self.conv = nn.SequentialCell(layers)
self.add = P.Add()
self.cast = P.Cast()
self.last_relu = last_relu
self.relu = nn.ReLU6()
@ -143,7 +142,7 @@ class InvertedResidual(nn.Cell):
identity = x
x = self.conv(x)
if self.use_res_connect:
x = self.add(identity, x)
x = identity + x
if self.last_relu:
x = self.relu(x)
return x