You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.
I though Dan had talked about .map becoming differentiable recently in an open design meeting, but there is still an issue as of the 9/16 Xcode snapshot. The compiler lets this through, but it produces an incorrect derivative:
func mappy(a:[Double])->Double{lettwice= a.map{$0 *2} //compiles, but resulting gradient is incorrect (empty list)
// let twice = a.differentiableMap{$0 * 2} //works, gradient is [2.0, 2.0, 2.0]
return twice.differentiableReduce(0,+)}print(valueWithGradient(at:[1,2,3], in: mappy))
The text was updated successfully, but these errors were encountered:
I though Dan had talked about
.map
becoming differentiable recently in an open design meeting, but there is still an issue as of the 9/16 Xcode snapshot. The compiler lets this through, but it produces an incorrect derivative:The text was updated successfully, but these errors were encountered: