# \#adjoint

**URL:** https://discourse.julialang.org/tag/adjoint/607.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Adjoint or transpose of Char or Vector{Char}](https://discourse.julialang.org/t/adjoint-or-transpose-of-char-or-vector-char/137412)

<div class="topic-metadata">

**Author:** [@jecs](https://discourse.julialang.org/u/jecs)\
**Replies:** 1\
**Last updated:** [June 2, 2026, 9:34pm UTC](https://discourse.julialang.org/t/adjoint-or-transpose-of-char-or-vector-char/137412 "2026-06-02T21:34:28Z")

</div>

Scalar case: julia\> 1' 1 julia\> 'a'' ERROR: MethodError: no method matching adjoint(::Char) The function \`adjoint\` exists, but no method is defined for this combination of argument types. ... Vector case: julia\> \[1…

---

## [Finding mutations that Zygote complains about](https://discourse.julialang.org/t/finding-mutations-that-zygote-complains-about/135864)

<div class="topic-metadata">

**Author:** [@Neodym](https://discourse.julialang.org/u/Neodym)\
**Replies:** 19\
**Last updated:** [March 1, 2026, 6:47pm UTC](https://discourse.julialang.org/t/finding-mutations-that-zygote-complains-about/135864 "2026-03-01T18:47:53Z")

</div>

Hey, Apparently, I have some hidden mutations in my code that I cannot find. Unfortunately, Zygote easily finds them and complains about it. I get call stacks 40+ layers deep, the last of my own functions being near th…

---

## [Adjoint sensitivities for non-numeric types in ModelingToolkit.jl](https://discourse.julialang.org/t/adjoint-sensitivities-for-non-numeric-types-in-modelingtoolkit-jl/132082)

<div class="topic-metadata">

**Author:** [@mxp](https://discourse.julialang.org/u/mxp)\
**Replies:** 2\
**Last updated:** [October 17, 2025, 4:51pm UTC](https://discourse.julialang.org/t/adjoint-sensitivities-for-non-numeric-types-in-modelingtoolkit-jl/132082 "2025-10-17T16:51:26Z")

</div>

I’d like to use non-numeric types in ModelingToolkit.jl, but with adjoint sensitivities. When using DifferentialEquations.jl there is support for this through SciMLStructures.jl as described here. So I assumed this would…

---

## [Is there a particular reason why one sense algorithm will give an error whereas other will not?](https://discourse.julialang.org/t/is-there-a-particular-reason-why-one-sense-algorithm-will-give-an-error-whereas-other-will-not/123667)

<div class="topic-metadata">

**Author:** [@sunaina2821](https://discourse.julialang.org/u/sunaina2821)\
**Replies:** 0\
**Last updated:** [December 10, 2024, 3:41pm UTC](https://discourse.julialang.org/t/is-there-a-particular-reason-why-one-sense-algorithm-will-give-an-error-whereas-other-will-not/123667 "2024-12-10T15:41:22Z")

</div>

So, my script completely works when I use the ForwardDiffSensitivity() algorithm to solve the ODE but it does not work when I use QuadratureAdjoint(autojacvec=ZygoteVJP(true)). I will probably update this with a MWE late…

---

## [Adjoint vector boundary condition](https://discourse.julialang.org/t/adjoint-vector-boundary-condition/118149)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 1\
**Last updated:** [August 15, 2024, 7:31pm UTC](https://discourse.julialang.org/t/adjoint-vector-boundary-condition/118149 "2024-08-15T19:31:48Z")

</div>

Hi, I am using Gridap to find adjoint vectors in finite element space. Assume that I have a beam with applied displacement as boundary condition on a line. In this case I got discontinuities in values of adjoint vectors.…

---

## [Do I understand Enzyme properly?](https://discourse.julialang.org/t/do-i-understand-enzyme-properly/97760)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 7\
**Last updated:** [April 22, 2023, 8:43am UTC](https://discourse.julialang.org/t/do-i-understand-enzyme-properly/97760 "2023-04-22T08:43:45Z")

</div>

I think I finally have a grasp on how Enzyme works, but I would like an expert to validate this. Consider a possibly mutating vector function f(x, y) which outputs a scalar value z. We denote by x\_a and y\_a the contents…

---

## [Automatic gradient ∼10x slower to evaluate than the primal computation](https://discourse.julialang.org/t/automatic-gradient-10x-slower-to-evaluate-than-the-primal-computation/93925)

<div class="topic-metadata">

**Author:** [@user22](https://discourse.julialang.org/u/user22)\
**Replies:** 2\
**Last updated:** [February 3, 2023, 6:15am UTC](https://discourse.julialang.org/t/automatic-gradient-10x-slower-to-evaluate-than-the-primal-computation/93925 "2023-02-03T06:15:44Z")

</div>

I need to evaluate a basic dense and a few-layer neural network with up to tens of thousands of inputs at once. The outputs will be then forwarded to another function, which returns a scalar. However, the performance of …

---

## [Help needed with Zygote Flux and custom adjoints on GPU](https://discourse.julialang.org/t/help-needed-with-zygote-flux-and-custom-adjoints-on-gpu/74326)

<div class="topic-metadata">

**Author:** [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Replies:** 1\
**Last updated:** [January 11, 2022, 3:27am UTC](https://discourse.julialang.org/t/help-needed-with-zygote-flux-and-custom-adjoints-on-gpu/74326 "2022-01-11T03:27:30Z")

</div>

I am incorporating some simple non-standard elements in a larger DNN. To achieve this I had to manually define some reverse rules through ChainRulesCore syntax ChainRulesCore.rrule(::typeof(f),args...) Which works gre…

---

## [ChainRulesCore: Custom adjoint ignored in certain cases](https://discourse.julialang.org/t/chainrulescore-custom-adjoint-ignored-in-certain-cases/67814)

<div class="topic-metadata">

**Author:** [@Rasmus\_Hoier](https://discourse.julialang.org/u/Rasmus_Hoier)\
**Replies:** 3\
**Last updated:** [September 7, 2021, 2:32pm UTC](https://discourse.julialang.org/t/chainrulescore-custom-adjoint-ignored-in-certain-cases/67814 "2021-09-07T14:32:10Z")

</div>

Hi, A colleague of mine ran into the issue that custom adjoints get ignored in certain cases in recent versions of ChainRulesCore. Here is a minimal working example: using Flux, ChainRulesCore my\_fun(x) = x\*x …

---

## [Why is \`copy(adjoint)\` not an adjoint object?](https://discourse.julialang.org/t/why-is-copy-adjoint-not-an-adjoint-object/55371)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 12\
**Last updated:** [February 18, 2021, 7:03am UTC](https://discourse.julialang.org/t/why-is-copy-adjoint-not-an-adjoint-object/55371 "2021-02-18T07:03:11Z")

</div>

This surprised me: julia\> typeof(copy(rand(4,4)')) Matrix{Float64} (alias for Array{Float64, 2}) julia\> typeof(deepcopy(rand(4,4)')) LinearAlgebra.Adjoint{Float64, Matrix{Float64}} I have an algorithm which looks pret…
