|
35 | 35 | # rate according to the number of replicas. This change is introduced to be |
36 | 36 | # consistent with how gradients are aggregated (averaged) within a batch in a |
37 | 37 | # replica. |
38 | | -class SyncReplicasOptimizerV2(optimizer.Optimizer): |
| 38 | +class SyncReplicasOptimizer(optimizer.Optimizer): |
39 | 39 | """Class to synchronize, aggregate gradients and pass them to the optimizer. |
40 | 40 |
|
41 | 41 | In a typical asynchronous training environment, it's common to have some |
@@ -96,8 +96,8 @@ class SyncReplicasOptimizerV2(optimizer.Optimizer): |
96 | 96 | # Note that if you want to have 2 backup replicas, you can change |
97 | 97 | # total_num_replicas=52 and make sure this number matches how many physical |
98 | 98 | # replicas you started in your job. |
99 | | - opt = tf.SyncReplicasOptimizerV2(opt, replicas_to_aggregate=50, |
100 | | - total_num_replicas=50) |
| 99 | + opt = tf.SyncReplicasOptimizer(opt, replicas_to_aggregate=50, |
| 100 | + total_num_replicas=50) |
101 | 101 |
|
102 | 102 | # Some models have startup_delays to help stabilize the model but when using |
103 | 103 | # sync_replicas training, set it to 0. |
@@ -182,7 +182,7 @@ def __init__(self, |
182 | 182 | if total_num_replicas is None: |
183 | 183 | total_num_replicas = replicas_to_aggregate |
184 | 184 |
|
185 | | - super(SyncReplicasOptimizerV2, self).__init__(use_locking, name) |
| 185 | + super(SyncReplicasOptimizer, self).__init__(use_locking, name) |
186 | 186 | logging.info( |
187 | 187 | "SyncReplicasV2: replicas_to_aggregate=%s; total_num_replicas=%s", |
188 | 188 | replicas_to_aggregate, total_num_replicas) |
|
0 commit comments