!8571 revert pynative getnext

From: @chujinjin
Reviewed-by: @kisnwang,@limingqi107
Signed-off-by: @limingqi107
pull/8571/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 7224880b72

@ -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("device_target") == "CPU": elif context.get_context("device_target") == "CPU" or context.get_context("mode") == context.PYNATIVE_MODE:
logger.warning("The CPU cannot support dataset sink mode currently." logger.warning("The CPU or PyNative mode 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