提交 826f0e1c 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!540 fix bugs for imagenet

Merge pull request !540 from moran/master
......@@ -61,5 +61,5 @@ cp -r ../src ./eval
cd ./eval || exit
env > env.log
echo "start evaluation for device $DEVICE_ID"
python eval.py --dataset_path=$PATH1 --checkpoint_path=$PATH2 &> log &
python eval.py --dataset_path=$PATH1 --checkpoint_path=$PATH2 --dataset_sink_mode=False &> log &
cd ..
......@@ -61,5 +61,5 @@ cp -r ../src ./eval
cd ./eval || exit
env > env.log
echo "start evaluation for device $DEVICE_ID"
python eval.py --dataset_path=$PATH1 --checkpoint_path=$PATH2 &> log &
python eval.py --dataset_path=$PATH1 --checkpoint_path=$PATH2 --dataset_sink_mode=False &> log &
cd ..
......@@ -124,7 +124,7 @@ if __name__ == '__main__':
{% if dataset=='ImageNet' %}
if not cfg.use_label_smooth:
cfg.label_smooth_factor = 0.0
loss = CrossEntLambropy(smooth_factor=cfg.label_smooth_factor, num_classes=cfg.num_classes)
loss = CrossEntropy(smooth_factor=cfg.label_smooth_factor, num_classes=cfg.num_classes)
{% else %}
{% if loss=='SoftmaxCrossEntropyWithLogits' %}
loss = nn.SoftmaxCrossEntropyWithLogits(sparse=True, reduction='mean')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册