!462 fix dataset deepcopy failed while depipline referenced in the iterator

Merge pull request !462 from caojian05/mindspore_master_bugfix
This commit is contained in:
mindspore-ci-bot 2020-04-19 01:50:02 +08:00 committed by Gitee
commit 663ae4d7c2
1 changed files with 3 additions and 0 deletions

View File

@ -231,6 +231,9 @@ class Iterator:
def num_classes(self): def num_classes(self):
return self.depipeline.GetNumClasses() return self.depipeline.GetNumClasses()
def __deepcopy__(self, memo):
return Iterator(copy.deepcopy(self.dataset, memo))
class DictIterator(Iterator): class DictIterator(Iterator):
""" """