File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed
Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -39,20 +39,11 @@ function ChainRulesCore.rrule(
3939 return output, tensoralloc_pullback
4040end
4141
42- # TODO : possibly use the non-inplace functions, to avoid depending on Base.copy
4342function ChainRulesCore. rrule (:: typeof (tensorscalar), C)
4443 projectC = ProjectTo (C)
4544 function tensorscalar_pullback (Δc)
46- # ΔC = TensorOperations.tensoralloc(typeof(C), TensorOperations.tensorstructure(C))
4745 _Δc = unthunk (Δc)
48- # @show _Δc
49- # _Δc_scalar =
50- # _Δc isa Number ? Δc :
51- # _Δc isa AbstractArray ? only(Δc) :
52- # throw(ArgumentError("unexpected Δc: $(typeof(_Δc))"))
53- # @show projectC(_Δc_scalar)
5446 return NoTangent (), projectC (_Δc)
55- # return NoTangent(), fill!(ΔC, unthunk(Δc))
5647 end
5748 return tensorscalar (C), tensorscalar_pullback
5849end
You can’t perform that action at this time.
0 commit comments