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

Wrapper to enable recurrent cells to handle sequential input #91

@tanmayb123

Description

@tanmayb123

In Flux (machine learning for Julia) you can wrap an RNN Cell in a Recur type so it can keep track of the hidden state for you. Here's an example from their code:

accum(h, x) = (h+x, x)
rnn = Flux.Recur(accum, 0)
rnn(2) # 2
rnn(3) # 3
rnn.state # 5
rnn.(1:10) # apply to a sequence
rnn.state # 60

Would it be valuable to have something similar with swift-apis?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions