Skip to content

Flux Compatibility #2

@MikeInnes

Description

@MikeInnes

You may have noticed that I recently overhauled Flux's AD to emphasise a more functional API. My not-so-secret goal here is that Flux's current AD will be forwards-compatible with the better infrastructure that we are building; it should be easy to swap Capstan into an existing model without any code changes.

For the most part, this isn't any of Capstan's problem. But we do need Capstan to be able to strip away Flux's tracking before applying its own. Capstan already does checks whenever a new value is introduced to the program (for the wrt! API), so this should be as simple as applying a function like unwrap just after that –

unwrap(x) = x
# In Flux
unwrap(x::TrackedArray) = x.data

We can use this issue to discuss any other compatibility issues that might come up; it might be useful to start having some Flux examples, and I'm happy to help get that set up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions