swift
fb8f187a - [AutoDiff] Add VJP for 'Array.init(repeating:count:)'. (#27255)

Commit
6 years ago
[AutoDiff] Add VJP for 'Array.init(repeating:count:)'. (#27255) Add a VJP for `Array.init(repeating:count:)` so that it can be differentiated. The VJP is merely a transpose since `init(repeating:count:)` is linear w.r.t. the repeated value. Its tranpose is a linear map that takes an `Array.TangentVector` and returns the sum of all of its elements. Resolves [TF-802](https://bugs.swift.org/browse/TF-802).
Author
Parents
Loading