public struct BidirectionalRecurrentLayer<Cell: RecurrentLayerCell>: Layer
where Cell.TimeStepOutput: Mergeable
-
Declaration
public typealias Input = [Cell.TimeStepInput]
-
Declaration
public typealias Output = [Cell.TimeStepOutput]
-
Declaration
public typealias MergeFunction = @differentiable (Cell.TimeStepOutput, Cell.TimeStepOutput) -> Cell.TimeStepOutput
-
The forward recurrent layer.
Declaration
public var forward: RecurrentLayer<Cell>
-
The backward recurrent layer.
Declaration
public var backward: RecurrentLayer<Cell>
-
The differentiable function used for merging forward and backward recurrent layer outputs.
Declaration
@noDerivative public var mergeFunction: MergeFunction { get }
-
Creates an instance from the given recurrent layer cell and merge function.
Declaration
public init(_ cell: @autoclosure () -> Cell, mergeFunction: @escaping MergeFunction = concatenate)
-
Declaration
@differentiable public func lastOutput( from inputs: Input, initialForwardLayerState: Cell.State, initialBackwardLayerState: Cell.State ) -> Cell.TimeStepOutput
-
Declaration
@differentiable public func lastOutput(from inputs: Input) -> Cell.TimeStepOutput