Skip to content

Commit

Permalink
Update DistributedTraining.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AqwamCreates authored Nov 28, 2024
1 parent 73d29ab commit 94bb910
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/Tutorials/DistributedTraining.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,15 @@ DistributedModelParameters:setMainModelParameters(ModelParameters1)

LinearRegression1:setAreGradientsSaved(false) -- We don't need to save the gradients because we're directly using the model parameters.

LinearRegression1:setParameters(500) -- We need to set the number of iterations to certain values so the cost values converges.
-- Then we train our model first.

-- We then need to add the models to DistributedModelParameters.
LinearRegression1:train(featureMatrix, labelVector)

DistributedModelParameters:addModel(LinearRegression1)
-- We then need to add the model parameters to DistributedModelParameters.

local ModelParameters1 = DistributedModelParameters:getMainModelParameters(ModelParameters1)

DistributedModelParameters:addModelParameters(ModelParameters1)

-- Once set, we can start training our models individually and update the model parameters in DistributedModelParameters object.

Expand Down

0 comments on commit 94bb910

Please sign in to comment.