Browse Source

!8428 support getnext in pynative mode

From: @chujinjin
Reviewed-by: @jjfeing,@kisnwang
Signed-off-by: @kisnwang
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
ff966f3432
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mindspore/train/model.py

+ 2
- 2
mindspore/train/model.py View File

@@ -366,8 +366,8 @@ class Model:
with _CallbackManager(callbacks) as list_callback: with _CallbackManager(callbacks) as list_callback:
if not dataset_sink_mode: if not dataset_sink_mode:
self._train_process(epoch, train_dataset, list_callback, cb_params) self._train_process(epoch, train_dataset, list_callback, cb_params)
elif context.get_context("mode") == context.PYNATIVE_MODE or context.get_context("device_target") == "CPU":
logger.warning("The pynative mode and CPU cannot support dataset sink mode currently."
elif context.get_context("device_target") == "CPU":
logger.warning("The CPU cannot support dataset sink mode currently."
"So the training process will be performed with dataset not sink.") "So the training process will be performed with dataset not sink.")
self._train_process(epoch, train_dataset, list_callback, cb_params) self._train_process(epoch, train_dataset, list_callback, cb_params)
else: else:


Loading…
Cancel
Save