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

Minor mistakes in adam documentation #195

Merged
merged 1 commit into from
Jun 11, 2019
Merged
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
6 changes: 3 additions & 3 deletions Sources/TensorFlow/Optimizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class Adam<Model: Layer>: Optimizer
public var beta2: 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 current step.
public var step: Int = 0
Expand All @@ -73,7 +73,7 @@ public class Adam<Model: Layer>: Optimizer
precondition(learningRate >= 0, "Learning rate must be non-negative")
precondition(0 <= beta1 && beta1 <= 1, "Beta parameter must be between 0 and 1")
precondition(0 <= beta2 && beta2 <= 1, "Beta parameter must be between 0 and 1")
precondition(decay >= 0, "Weight decay must be non-negative")
precondition(decay >= 0, "Learning rate decay must be non-negative")

self.learningRate = learningRate
self.beta1 = beta1
Expand Down Expand Up @@ -216,7 +216,7 @@ public class SGD<Model: Layer>: Optimizer
public var velocity: Model.AllDifferentiableVariables
/// The set of steps taken.
public var step: Int = 0

public init(
for model: __shared Model,
learningRate: Float = 0.01,
Expand Down