We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61d4a62 commit e3f31e1Copy full SHA for e3f31e1
src/rulesets/LinearAlgebra/norm.jl
@@ -1,6 +1,3 @@
1
-
2
-rrule(f::Function, args...; kwargs...) = (@error "no rrule defined!" f args ; nothing)
3
4
#####
5
##### `norm`
6
@@ -69,11 +66,7 @@ function rrule(::typeof(norm), x::AbstractArray)
69
66
norm_pullback_2(::Zero) = (NO_FIELDS, Zero())
70
67
return y, norm_pullback_2
71
68
end
72
-function rrule(
73
- ::typeof(norm),
74
- x::Union{LinearAlgebra.TransposeAbsVec, LinearAlgebra.AdjointAbsVec},
75
- p::Real,
76
-)
+function rrule(::typeof(norm), x::Union{LinearAlgebra.AdjOrTransAbsVec}, p::Real)
77
y, inner_pullback = rrule(norm, parent(x), p)
78
function norm_pullback(Δy)
79
(∂self, ∂x′, ∂p) = inner_pullback(Δy)
0 commit comments