@@ -269,8 +269,8 @@ The [`AggregationAlgorithm`](@ref) in this library requires you to specify three
269269 using Statistics
270270
271271 struct ToBeAggregatedGD <: AbstractAlgorithm{Vector{Float64},Vector{Float64}}
272- stepsize:: Float64
273272 q1:: Vector{Float64}
273+ stepsize:: Float64
274274 end
275275
276276 (tba:: ToBeAggregatedGD )(problem:: Any ) = tba. q1
@@ -279,7 +279,7 @@ The [`AggregationAlgorithm`](@ref) in this library requires you to specify three
279279 (tba:: ToBeAggregatedGD )(q:: Vector{Float64} , problem:: Any ) = q - tba. stepsize * problem.∇f (q)
280280end
281281
282- algorithm = AggregationAlgorithm (ToBeAggregatedGD (0.01 , rand (10 )); pids= workers ())
282+ algorithm = AggregationAlgorithm (ToBeAggregatedGD (rand (10 ), 0.01 ); pids= workers ())
283283
284284history = start (algorithm, distributed_problem, (epoch= 100 ,));
285285```
@@ -291,16 +291,16 @@ history = start(algorithm, distributed_problem, (epoch=100,));
291291``` julia
292292@everywhere begin
293293 struct ToBeAveragedGD <: AbstractAlgorithm{Vector{Float64},Vector{Float64}}
294- stepsize:: Float64
295294 q1:: Vector{Float64}
295+ stepsize:: Float64
296296 end
297297
298298 (tba:: ToBeAveragedGD )(problem:: Any ) = tba. q1
299299 (tba:: ToBeAveragedGD )(a:: Vector{Float64} , problem:: Any ) = a
300300 (tba:: ToBeAveragedGD )(q:: Vector{Float64} , problem:: Any ) = q - tba. stepsize * problem.∇f (q)
301301end
302302
303- algorithm = AveragingAlgorithm (ToBeAveragedGD (0.01 , rand (10 )); pids= workers (), weights= ones (nworkers ()))
303+ algorithm = AveragingAlgorithm (ToBeAveragedGD (rand (10 ), 0.01 ); pids= workers (), weights= ones (nworkers ()))
304304
305305history = start (algorithm, distributed_problem, (epoch= 100 ,));
306306```
0 commit comments