public struct OptimizerState
يتم الوصول إلى الحالة العالمية من خلال StateAccessor
.
تصريح
public init(_ zeros: [Tensor<Float>], stateCount: Int)
تصريح
public init(copying other: OptimizerState, to device: Device)
تصريح
public var state: [Tensor<Float>]
تصريح
public var stride: Int
تصريح
public subscript(stateId: Int, weightId: Int) -> Tensor<Float> { get set }
تصريح
public subscript(state: OptimizerWeightStepState, index: StateAccessor) -> Tensor<Float> { get set }