We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2afe928 commit 0dfb5c9Copy full SHA for 0dfb5c9
python/paddle/fluid/incubate/fleet/collective/__init__.py
@@ -151,8 +151,10 @@ class CollectiveOptimizer(DistributedOptimizer):
151
"""
152
153
def __init__(self, optimizer, strategy=DistributedStrategy()):
154
+ if strategy is None:
155
+ strategy = DistributedStrategy()
156
super(CollectiveOptimizer, self).__init__(optimizer, strategy)
- if strategy is not None and strategy.forward_recompute:
157
+ if strategy.forward_recompute:
158
self.forward_recompute = True
159
self.recompute_checkpoints = strategy.recompute_checkpoints
160
else:
0 commit comments