!6291 fix bug in connect_network_with_dataset when using pynative mode

Merge pull request !6291 from wangnan39/fix_bug_in_connect_net_with_data_in_pynative
This commit is contained in:
mindspore-ci-bot 2020-09-16 09:49:35 +08:00 committed by Gitee
commit c9799fa678
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ def connect_network_with_dataset(network, dataset_helper):
raise RuntimeError("Dataset should be connected with network only in sink mode.")
if not hasattr(dataset, '__ME_INITED__') and context.get_context("device_target") == "Ascend" and \
context.get_context("mode") == context.GRAPH_MODE and not context.get_context("enable_ge"):
not context.get_context("enable_ge"):
dataset.__ME_INITED__ = True
dataset_types, dataset_shapes = dataset_helper.types_shapes()
queue_name = dataset.__TRANSFER_DATASET__.queue_name