Uploaded image for project: ' Swift for TensorFlow'
  1. Swift for TensorFlow
  2. TF-384

Control flow support in autodiff

    XMLWordPrintable

    Details

    • Type: Story
    • Status: In Progress
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: Autodiff
    • Labels:
      None

      Description

      A requirement for any major language feature in Swift is to work well with common programming patterns and maintain a progressive disclosure of complexity. Differentiable programming is working fairly reliably for any straight-line code, but it does not work well with control flow constructs, such as `if`, `guard`, `while`, `for` and `switch`. In order for differentiable programming to be considered by Swift Evolution, control flow statements have to be supported.

      Oh the other hand, the primary use case of automatic differentiation is deep learning. Common deep learning use cases require control flow, such as backpropagation through time and even simple layers whose behavior depends on flags or optionals. When control flow is not supported by autodiff, users are forced to write a derivative that switches on the condition manually and call derivatives of individual straight-line pieces as outlined functions. No user wants to do this.

      As such, we have a strong need for control flow support, and it is the most voted feature request by the Swift for TensorFlow team!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                danzheng Dan Zheng
                Reporter:
                xinranmsn Richard Wei
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: