diff --git a/python/paddle/distributed/spawn.py b/python/paddle/distributed/spawn.py index a371f5d559b597ea06171eefc6fc69dcbe56e6bf..4820d6dcd2f03e2e79a2579dec2bcc14898e4c79 100644 --- a/python/paddle/distributed/spawn.py +++ b/python/paddle/distributed/spawn.py @@ -531,7 +531,7 @@ def spawn(func, args=(), nprocs=-1, join=True, daemon=False, **options): class LinearNet(nn.Layer): def __init__(self): - super(LinearNet, self).__init__() + super().__init__() self._linear1 = nn.Linear(10, 10) self._linear2 = nn.Linear(10, 1) diff --git a/python/paddle/fluid/dygraph/jit.py b/python/paddle/fluid/dygraph/jit.py index c359c6d152f9efbe46c06b312a85e6e6eb3d4f21..042ddb25fc65efc6ce79824fb51ffb6ec4988664 100644 --- a/python/paddle/fluid/dygraph/jit.py +++ b/python/paddle/fluid/dygraph/jit.py @@ -1573,7 +1573,7 @@ class TracedLayer: class ExampleLayer(paddle.nn.Layer): def __init__(self): - super(ExampleLayer, self).__init__() + super().__init__() self._fc = paddle.nn.Linear(3, 10) def forward(self, input): @@ -1591,7 +1591,7 @@ class TracedLayer: print(out_static_graph[0].shape) # (2, 10) # save the static graph model for inference - static_layer.save_inference_model(dirname='./saved_infer_model') + static_layer.save_inference_model('./saved_infer_model') """ assert isinstance( @@ -1623,7 +1623,7 @@ class TracedLayer: class ExampleLayer(paddle.nn.Layer): def __init__(self): - super(ExampleLayer, self).__init__() + super().__init__() self._fc = paddle.nn.Linear(3, 10) def forward(self, input): @@ -1728,7 +1728,7 @@ class TracedLayer: class ExampleLayer(paddle.nn.Layer): def __init__(self): - super(ExampleLayer, self).__init__() + super().__init__() self._fc = paddle.nn.Linear(3, 10) def forward(self, input):