public protocol RNNCell: Layer
where
Input == RNNCellInput<TimeStepInput, State>,
Output == RNNCellOutput<TimeStepOutput, State>
Uma célula de rede neural recorrente.
A entrada em uma etapa de tempo.
Declaração
associatedtype TimeStepInput : Differentiable where Self.Input == RNNCellInput<Self.TimeStepInput, Self.State>
A saída em uma etapa de tempo.
Declaração
associatedtype TimeStepOutput : Differentiable where Self.Output == RNNCellOutput<Self.TimeStepOutput, Self.State>
O estado que pode ser preservado em intervalos de tempo.
Declaração
associatedtype State : Differentiable
Retorna um estado de valor zero com forma compatível com a entrada fornecida.
Declaração
func zeroState(for input: TimeStepInput) -> State
Retorna o novo estado obtido da aplicação da célula RNN à entrada no intervalo de tempo atual e no estado anterior.
Declaração
@differentiable public func callAsFunction( input: TimeStepInput, state: State ) -> RNNCellOutput<TimeStepOutput, State>
Parâmetros
timeStepInput
A entrada no intervalo de tempo atual.
previousState
O estado anterior da célula RNN.
Valor de retorno
A saída.
Declaração
@differentiable public func call(input: TimeStepInput, state: State) -> RNNCellOutput<TimeStepOutput, State>