Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Fix argument documentation #654

Merged
merged 4 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/TensorFlow/Optimizers/MomentumBased.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class RMSProp<Model: Differentiable>: Optimizer
public var rho: Float
/// A small scalar added to the denominator to improve numerical stability.
public var epsilon: Float
/// The weight decay.
/// The learning rate decay.
public var decay: Float
/// The step count.
public var step: Float = 0
Expand All @@ -46,7 +46,7 @@ public class RMSProp<Model: Differentiable>: Optimizer
) {
precondition(learningRate >= 0, "Learning rate must be non-negative")
precondition(rho >= 0, "Rho must be non-negative")
precondition(decay >= 0, "Weight decay must be non-negative")
precondition(decay >= 0, "Learning rate decay must be non-negative")

self.learningRate = learningRate
self.rho = rho
Expand Down
4 changes: 2 additions & 2 deletions Sources/TensorFlow/Optimizers/SGD.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SGD<Model: Differentiable>: Optimizer
/// The momentum factor. It accelerates stochastic gradient descent in the relevant direction
/// and dampens oscillations.
public var momentum: Float
/// The weight decay.
/// The learning rate decay.
public var decay: Float
/// Use Nesterov momentum if true.
public var nesterov: Bool
Expand All @@ -43,7 +43,7 @@ public class SGD<Model: Differentiable>: Optimizer
) {
precondition(learningRate >= 0, "Learning rate must be non-negative")
precondition(momentum >= 0, "Momentum must be non-negative")
precondition(decay >= 0, "Weight decay must be non-negative")
precondition(decay >= 0, "Learning rate decay must be non-negative")

self.learningRate = learningRate
self.momentum = momentum
Expand Down