Skip to content

Instantly share code, notes, and snippets.

View theogf's full-sized avatar
😶‍🌫️

Théo Galy-Fajou theogf

😶‍🌫️
View GitHub Profile
@niklasschmitz
niklasschmitz / rrule_from_frule.jl
Last active October 2, 2021 12:56
Getting an rrule from an frule in ChainRules.jl
# rrule from frule (transposition)
using Zygote
using ChainRulesCore
using LinearAlgebra
function f(x)
a = sin.(x)
b = sum(a)
c = b * a
return c