BasicRNN
public struct BasicRNN<Element, Device> : RNN, Codable where Element : RandomizableType, Device : DeviceType
A ‘vanilla’ RNN. In each step, the RNN performs the transformation matMul(x_t, W) + matMul(h_t-1, U) + b
-
Declaration
Swift
public typealias Inputs = Tensor<Element, Device>
-
Declaration
Swift
public var parameterPaths: [WritableKeyPath<`Self`, Tensor<Element, Device>>] { get }
-
Undocumented
Declaration
Swift
public let direction: RNNDirection
-
Undocumented
Declaration
Swift
public var W: Tensor<Element, Device>
-
Undocumented
Declaration
Swift
public var U: Tensor<Element, Device>
-
Undocumented
Declaration
Swift
public var b: Tensor<Element, Device>
-
Undocumented
Declaration
Swift
public var inputSize: Int { get }
-
Undocumented
Declaration
Swift
public var hiddenSize: Int { get }
-
Declaration
Swift
public var parameters: [Tensor<Element, Device>] { get }
-
A ‘vanilla’ RNN. In each step, the RNN performs the transformation matMul(x_t, W) + matMul(h_t-1, U) + b.
Declaration
Swift
public init(inputSize: Int, hiddenSize: Int, direction: RNNDirection = .forward)
-
Declaration
Swift
public func numberOfSteps(for inputs: Tensor<Element, Device>) -> Int