fix bug in connect_network_with_dataset

This commit is contained in:
wangnan39@huawei.com 2020-09-15 20:57:19 +08:00
parent 4abb33f151
commit 929a4b1d99
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