diff --git a/examples/federated_learning/surface_defect_detection_mindspore/interface.py b/examples/federated_learning/surface_defect_detection_mindspore/interface.py index ed84a61d0..55708ed71 100644 --- a/examples/federated_learning/surface_defect_detection_mindspore/interface.py +++ b/examples/federated_learning/surface_defect_detection_mindspore/interface.py @@ -35,7 +35,7 @@ s3_transmitter = FederatedLearningV2.get_transmitter_from_config() class SddDataset(): - def __init__(self, x, y) -> None: + def __init__(self, x, y): self.labels = y self.images = x self.index = 0 @@ -54,7 +54,7 @@ def __next__(self): class myDataset: - def __init__(self, trainset=None, testset=None) -> None: + def __init__(self, trainset=None, testset=None): self.customized = True transform = [ c_vision.Resize((128, 128)), @@ -107,7 +107,7 @@ def construct(self, x): return x class Estimator: - def __init__(self) -> None: + def __init__(self): self.model = SddModel() self.pretrained = None self.saved = None diff --git a/examples/federated_learning/surface_defect_detection_pytorch/interface.py b/examples/federated_learning/surface_defect_detection_pytorch/interface.py index 2c961646d..ed42d913e 100644 --- a/examples/federated_learning/surface_defect_detection_pytorch/interface.py +++ b/examples/federated_learning/surface_defect_detection_pytorch/interface.py @@ -35,7 +35,7 @@ s3_transmitter = FederatedLearningV2.get_transmitter_from_config() class SddDataset(Dataset): - def __init__(self, x, y) -> None: + def __init__(self, x, y): self.images = x self.labels = y @@ -46,13 +46,13 @@ def __getitem__(self, index): return self.images[index], self.labels[index] class myDataset: - def __init__(self, trainset=None, testset=None) -> None: + def __init__(self, trainset=None, testset=None): self.customized = True self.trainset = SddDataset(trainset[0], trainset[1]) self.testset = SddDataset(testset[0], testset[1]) class Estimator: - def __init__(self) -> None: + def __init__(self): self.model = self.build() self.pretrained = None self.saved = None diff --git a/examples/federated_learning/surface_defect_detection_tensorflow/interface.py b/examples/federated_learning/surface_defect_detection_tensorflow/interface.py index 3248ce933..af0eaa7b6 100644 --- a/examples/federated_learning/surface_defect_detection_tensorflow/interface.py +++ b/examples/federated_learning/surface_defect_detection_tensorflow/interface.py @@ -36,7 +36,7 @@ class Dataset: - def __init__(self, trainset=None, testset=None) -> None: + def __init__(self, trainset=None, testset=None): self.customized = True self.trainset = tf.data.Dataset.from_tensor_slices((trainset.x, trainset.y)) self.trainset = self.trainset.batch(int(Context.get_parameters("batch_size", 32))) @@ -44,7 +44,7 @@ def __init__(self, trainset=None, testset=None) -> None: self.testset = self.testset.batch(int(Context.get_parameters("batch_size", 32))) class Estimator: - def __init__(self) -> None: + def __init__(self): self.model = self.build() self.pretrained = None self.saved = None