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

Commit d42e80f

Browse files
dan-zhengrxwei
authored andcommitted
Change Differentiable.moved(along:) to move(along:). (#236)
1 parent 4b505bf commit d42e80f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/TensorFlow/Layers/Recurrent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public struct SimpleRNNCell<Scalar: TensorFlowFloatingPoint>: RNNCell, VectorPro
8888
// TODO(TF-507): Revert to `typealias State = Tensor<Scalar>` after
8989
// SR-10697 is fixed.
9090
public struct State: Equatable, Differentiable, VectorProtocol, KeyPathIterable {
91-
public let value: Tensor<Scalar>
91+
public var value: Tensor<Scalar>
9292
public init(_ value: Tensor<Scalar>) {
9393
self.value = value
9494
}

Sources/TensorFlow/Optimizer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public class RiemannSGD<Model: Layer, Scalar: FloatingPoint>: Optimizer
291291

292292
public func update(_ model: inout Model.AllDifferentiableVariables,
293293
along direction: Model.TangentVector) {
294-
model = model.moved(along: learningRate * (.zero - direction))
294+
model.move(along: learningRate * (.zero - direction))
295295
}
296296
}
297297

0 commit comments

Comments
 (0)