revert pynative getnext

This commit is contained in:
chujinjin 2020-11-13 15:31:28 +08:00
parent c11c79170e
commit f494025db8
1 changed files with 2 additions and 2 deletions

View File

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