Browse Source

fix bug in connect_network_with_dataset

tags/v1.0.0
wangnan39@huawei.com 5 years ago
parent
commit
929a4b1d99
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/train/dataset_helper.py

+ 1
- 1
mindspore/train/dataset_helper.py 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


Loading…
Cancel
Save