improved restructure adjoint

This commit is contained in:
Mike J Innes 2020-05-27 12:28:22 +01:00
parent 85c39e2309
commit 089ec0832c
1 changed files with 4 additions and 0 deletions

View File

@ -246,6 +246,10 @@ function _restructure(m, xs)
end
end
@adjoint function _restructure(m, xs)
_restructure(m, xs), dm -> (nothing,destructure(dm)[1])
end
"""
destructure(m)