!2159 add virtualDatasetCell in eval

Merge pull request !2159 from yao_yf/add_virtualdataset_in_eval
This commit is contained in:
mindspore-ci-bot 2020-06-17 14:08:56 +08:00 committed by Gitee
commit 7038df8b99
1 changed files with 2 additions and 0 deletions

View File

@ -171,6 +171,8 @@ class Model:
self._eval_indexes = [0, 1, 2]
if self._parallel_mode in (ParallelMode.SEMI_AUTO_PARALLEL, ParallelMode.AUTO_PARALLEL):
if self._optimizer:
self._eval_network = _VirtualDatasetCell(self._eval_network)
self._eval_network.set_auto_parallel()
def _build_predict_network(self):