 public class SGD<Model: Layer, Scalar: TensorFlowFloatingPoint>: Optimizer
     where Model.AllDifferentiableVariables == Model.CotangentVector {
     /// The learning rate.
-    public let learningRate: Scalar
+    public var learningRate: Scalar
     /// The momentum factor. It accelerates stochastic gradient descent in the relevant direction
     /// and dampens oscillations.
-    public let momentum: Scalar
+    public var momentum: Scalar
     /// The weight decay.
-    public let decay: Scalar
+    public var decay: Scalar
     /// Use Nesterov momentum if true.
-    public let nesterov: Bool
+    public var nesterov: Bool
 
     public init(
         learningRate: Scalar = 0.01,

public class Adam<Model: Layer, Scalar: TensorFlowFloatingPoint>: Optimizer
    where Model.AllDifferentiableVariables == Model.CotangentVector {
    /// The learning rate.
    public let learningRate: Scalar
    /// A coefficient used to calculate the first and second moments of
    /// gradients.
    public var beta1: Scalar

    /// The scalar parameter type.
    associatedtype Scalar: FloatingPoint
    /// The learning rate.
    var learningRate: Scalar { get set }
    /// Updates the specified differentiable variables along the specified
    /// direction.
    mutating func update(_ variables: inout Model.AllDifferentiableVariables,
