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

Change Differentiable.moved(along:) to move(along:). #234

Closed
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
2 changes: 1 addition & 1 deletion Sources/TensorFlow/Layers/Recurrent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public struct SimpleRNNCell<Scalar: TensorFlowFloatingPoint>: RNNCell, VectorPro
// TODO(TF-507): Revert to `typealias State = Tensor<Scalar>` after
// SR-10697 is fixed.
public struct State: Equatable, Differentiable, VectorProtocol, KeyPathIterable {
public let value: Tensor<Scalar>
public var value: Tensor<Scalar>
public init(_ value: Tensor<Scalar>) {
self.value = value
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/TensorFlow/Optimizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public class RiemannSGD<Model: Layer, Scalar: FloatingPoint>: Optimizer

public func update(_ model: inout Model.AllDifferentiableVariables,
along direction: Model.TangentVector) {
model = model.moved(along: learningRate * (.zero - direction))
model.move(along: learningRate * (.zero - direction))
}
}

Expand Down