impICNF / ContinuousNormalizingFlows.jl

Implementations of Infinitesimal Continuous Normalizing Flows Algorithms in Julia
https://impicnf.github.io/ContinuousNormalizingFlows.jl/
MIT License
24 stars 1 forks source link

ERROR: LoadError: MethodError: no method matching forwarddiffs_model_time(::Nothing) #169

Closed prbzrg closed 1 year ago

prbzrg commented 1 year ago

Code:

using ICNF
using Lux, Zygote, ComponentArrays, TruncatedStacktraces
using Random

TruncatedStacktraces.VERBOSE[] = true

r = rand(Float32, 1, 128)
nn = Lux.Dense(1 => 1)
ps, st = Lux.setup(Random.default_rng(), nn)
ps2 = ComponentArray(ps)
icnf = construct(RNODE, nn, 1; compute_mode=ZygoteMatrixMode)
diff_loss(x) = loss(icnf, r, x, st)

diff_loss(ps2)
Zygote.jacobian(diff_loss, ps2)

Environment:

Status `C:\Users\Hossein Pourbozorg\Code Projects\Mine\bug-find\bf-1\Project.toml`
⌅ [052768ef] CUDA v3.13.1
  [b0b7db55] ComponentArrays v0.13.8
  [0c46a032] DifferentialEquations v7.7.0
  [9bd0f7d2] ICNF v0.2.0 `https://github.com/impICNF/ICNF.jl#main`
⌃ [b2108857] Lux v0.4.37
  [1ed8b502] SciMLSensitivity v7.25.0
  [781d530d] TruncatedStacktraces v1.1.0
  [e88e6eb3] Zygote v0.6.55
  [9a3f8284] Random
Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated`
Status `C:\Users\Hossein Pourbozorg\Code Projects\Mine\bug-find\bf-1\Manifest.toml`
  [c29ec348] AbstractDifferentiation v0.5.1
  [621f4979] AbstractFFTs v1.2.1
  [1520ce14] AbstractTrees v0.4.4
  [7d9f7c33] Accessors v0.1.28
  [79e6a3ab] Adapt v3.6.1
  [dce04be8] ArgCheck v2.3.0
  [ec485272] ArnoldiMethod v0.2.0
  [4fba245c] ArrayInterface v7.2.1
  [30b0a656] ArrayInterfaceCore v0.1.29
  [4c555306] ArrayLayouts v0.8.18
  [a9b6321e] Atomix v0.1.0
⌅ [ab4f0b2a] BFloat16s v0.2.0
  [aae01518] BandedMatrices v0.17.16
  [198e06fe] BangBang v0.3.37
  [9718e550] Baselet v0.1.1
  [62783981] BitTwiddlingConvenienceFunctions v0.1.5
  [764a87c0] BoundaryValueDiffEq v2.11.0
  [fa961155] CEnum v0.4.2
  [2a0fbf3d] CPUSummary v0.2.2
⌅ [052768ef] CUDA v3.13.1
  [72cfdca4] CUDAKernels v0.4.7
  [49dc2e85] Calculus v0.5.1
  [7057c7e9] Cassette v0.3.11
  [324d7699] CategoricalArrays v0.10.7
  [af321ab8] CategoricalDistributions v0.1.10
  [082447d4] ChainRules v1.48.0
  [d360d2e6] ChainRulesCore v1.15.7
  [9e997f8a] ChangesOfVariables v0.1.6
  [fb6a15b2] CloseOpenIntervals v0.1.12
  [35d6a980] ColorSchemes v3.20.0
  [3da002f7] ColorTypes v0.11.4
  [c3611d14] ColorVectorSpace v0.9.10
  [5ae59095] Colors v0.12.10
  [38540f10] CommonSolve v0.2.3
  [bbf7d656] CommonSubexpressions v0.3.0
  [34da2185] Compat v4.6.1
  [b0b7db55] ComponentArrays v0.13.8
  [a33af91c] CompositionsBase v0.1.1
  [ed09eef8] ComputationalResources v0.3.2
  [88cd18e8] ConsoleProgressMonitor v0.1.2
  [187b0558] ConstructionBase v1.5.1
  [6add18c4] ContextVariablesX v0.1.3
  [d38c429a] Contour v0.6.2
  [adafc99b] CpuId v0.3.1
  [a8cc5b0e] Crayons v4.1.1
  [9a962f9c] DataAPI v1.14.0
  [a93c6f00] DataFrames v1.5.0
  [864edb3b] DataStructures v0.18.13
  [e2d170a0] DataValueInterfaces v1.0.0
  [244e2a9f] DefineSingletons v0.1.2
  [bcd4f6db] DelayDiffEq v5.41.0
  [b429d917] DensityInterface v0.4.0
  [2b5f629d] DiffEqBase v6.121.1
  [459566f4] DiffEqCallbacks v2.26.0
  [77a26b50] DiffEqNoiseProcess v5.16.0
  [163ba53b] DiffResults v1.1.0
  [b552c78f] DiffRules v1.13.0
  [0c46a032] DifferentialEquations v7.7.0
  [b4f34e82] Distances v0.10.7
  [31c24e10] Distributions v0.25.86
  [ced4e74d] DistributionsAD v0.6.43
  [ffbed154] DocStringExtensions v0.9.3
  [fa6b7ba4] DualNumbers v0.6.8
  [da5c29d0] EllipsisNotation v1.7.0
  [4e289a0a] EnumX v1.0.4
  [7da242da] Enzyme v0.10.18
⌅ [f151be2c] EnzymeCore v0.1.0
  [d4d017d3] ExponentialUtilities v1.24.0
  [e2ba6199] ExprTools v0.1.8
  [cc61a311] FLoops v0.2.1
  [b9860ae5] FLoopsBase v0.1.1
  [7034ab61] FastBroadcast v0.2.5
  [9aa1b823] FastClosures v0.3.2
  [29a986be] FastLapackInterface v1.2.9
  [1a297f60] FillArrays v0.13.7
  [6a86dc24] FiniteDiff v2.18.0
  [53c48c17] FixedPointNumbers v0.8.4
  [587475ba] Flux v0.13.13
  [9c68100b] FoldsThreads v0.1.1
  [59287772] Formatting v0.4.2
  [f6369f11] ForwardDiff v0.10.35
  [069b7b12] FunctionWrappers v1.1.3
  [77dc65aa] FunctionWrappersWrappers v0.1.3
  [d9f16b24] Functors v0.4.3
  [0c68f7d7] GPUArrays v8.6.3
  [46192b85] GPUArraysCore v0.1.4
  [61eb1bfa] GPUCompiler v0.17.2
  [c145ed77] GenericSchur v0.5.3
  [86223c79] Graphs v1.8.0
  [3e5b6fbb] HostCPUFeatures v0.1.14
  [34004b35] HypergeometricFunctions v0.3.11
  [9bd0f7d2] ICNF v0.2.0 `https://github.com/impICNF/ICNF.jl#main`
  [7869d1d1] IRTools v0.4.8
  [615f187c] IfElse v0.1.1
  [d25df0c9] Inflate v0.1.3
  [22cec73e] InitialValues v0.3.1
  [842dd82b] InlineStrings v1.4.0
  [3587e190] InverseFunctions v0.1.8
  [41ab1584] InvertedIndices v1.2.0
  [92d709cd] IrrationalConstants v0.2.2
  [c8e1da08] IterTools v1.4.0
  [42fd0dbc] IterativeSolvers v0.9.2
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.4.1
  [b14d175d] JuliaVariables v0.2.4
  [ccbc3e58] JumpProcesses v9.5.1
  [ef3ab10e] KLU v0.4.0
  [63c18a36] KernelAbstractions v0.8.6
  [ba0b0d4f] Krylov v0.9.0
  [0b1a1467] KrylovKit v0.6.0
  [929cbde3] LLVM v4.16.0
  [b964fa9f] LaTeXStrings v1.3.0
  [10f19ff3] LayoutPointers v0.1.14
  [50d2b5c4] Lazy v0.15.1
  [1d6d02ad] LeftChildRightSiblingTrees v0.2.0
  [2d8b4e74] LevyArea v1.0.0
  [d3d80556] LineSearches v7.2.0
  [7ed4a6bd] LinearSolve v1.38.0
  [2ab3a3ac] LogExpFunctions v0.3.23
  [e6f89c97] LoggingExtras v1.0.0
  [bdcacae8] LoopVectorization v0.12.152
  [30fc2ffe] LossFunctions v0.8.0
⌃ [b2108857] Lux v0.4.37
  [bb33d45b] LuxCore v0.1.2
  [82251201] LuxLib v0.1.11
  [a7f614a8] MLJBase v0.21.6
  [e80e1ace] MLJModelInterface v1.8.0
  [d8e11817] MLStyle v0.4.17
  [f1d291b0] MLUtils v0.4.1
  [1914dd2f] MacroTools v0.5.10
  [d125e4d3] ManualMemory v0.1.8
  [299715c1] MarchingCubes v0.1.6
  [128add7d] MicroCollections v0.1.3
  [e1d29d7a] Missings v1.1.0
  [46d2c3a1] MuladdMacro v0.2.4
  [d41bc354] NLSolversBase v7.8.3
  [2774e3e8] NLsolve v4.5.1
  [872c559c] NNlib v0.8.19
⌃ [a00861dc] NNlibCUDA v0.2.6
  [77ba4419] NaNMath v1.0.2
  [71a1bf82] NameResolution v0.1.5
  [8913a72c] NonlinearSolve v1.5.0
  [d8793406] ObjectFile v0.3.7
  [6fe1bfb0] OffsetArrays v1.12.9
  [0b1bfda6] OneHotArrays v0.2.3
  [429524aa] Optim v1.7.4
  [3bd65402] Optimisers v0.2.15
  [7f7a1694] Optimization v3.12.0
  [42dfb2eb] OptimizationOptimisers v0.1.1
  [bac558e1] OrderedCollections v1.4.1
  [1dea7af3] OrdinaryDiffEq v6.49.0
  [90014a1f] PDMats v0.11.17
  [d96e819e] Parameters v0.12.3
  [69de0a69] Parsers v2.5.8
  [e409e4f3] PoissonRandom v0.4.3
  [f517fe37] Polyester v0.7.3
  [1d0040c9] PolyesterWeave v0.2.1
  [2dfb63ee] PooledArrays v1.4.2
  [85a6dd25] PositiveFactorizations v0.2.4
  [d236fae5] PreallocationTools v0.4.12
  [21216c6a] Preferences v1.3.0
  [8162dcfd] PrettyPrint v0.2.0
  [08abe8d2] PrettyTables v2.2.2
  [33c8b6b6] ProgressLogging v0.1.4
  [92933f4c] ProgressMeter v1.7.2
  [1fd47b50] QuadGK v2.8.1
  [74087812] Random123 v1.6.0
  [e6cf234a] RandomNumbers v1.5.3
  [c1ae055f] RealDot v0.1.0
  [3cdcf5f2] RecipesBase v1.3.3
  [731186ca] RecursiveArrayTools v2.38.0
  [f2c3362d] RecursiveFactorization v0.2.18
  [189a3867] Reexport v1.2.2
  [ae029012] Requires v1.3.0
  [ae5879a3] ResettableStacks v1.1.1
  [37e2e3b7] ReverseDiff v1.14.4
  [79098fc4] Rmath v0.7.1
  [7e49a35a] RuntimeGeneratedFunctions v0.5.5
  [94e857df] SIMDTypes v0.1.0
  [476501e8] SLEEFPirates v0.6.38
  [0bca4576] SciMLBase v1.89.0
  [e9a6253c] SciMLNLSolve v0.1.3
  [c0aeaf25] SciMLOperators v0.2.0
  [1ed8b502] SciMLSensitivity v7.25.0
  [321657f4] ScientificTypes v3.0.2
  [30f210dd] ScientificTypesBase v3.0.0
  [91c51154] SentinelArrays v1.3.18
  [efcf1570] Setfield v1.1.1
  [605ecd9f] ShowCases v0.1.0
  [727e6d20] SimpleNonlinearSolve v0.1.13
  [699a6c99] SimpleTraits v0.9.4
  [66db9d55] SnoopPrecompile v1.0.3
  [a2af1166] SortingAlgorithms v1.1.0
  [47a9eef4] SparseDiffTools v1.31.0
  [e56a9233] Sparspak v0.3.9
  [276daf66] SpecialFunctions v2.2.0
  [171d559e] SplittablesBase v0.1.15
  [aedffcd0] Static v0.8.4
  [0d7ed370] StaticArrayInterface v1.3.0
  [90137ffa] StaticArrays v1.5.16
  [1e83bf80] StaticArraysCore v1.4.0
  [64bff920] StatisticalTraits v3.2.0
  [82ae8749] StatsAPI v1.5.0
  [2913bbd2] StatsBase v0.33.21
  [4c63d2b9] StatsFuns v1.3.0
  [9672c7b4] SteadyStateDiffEq v1.13.0
  [789caeaf] StochasticDiffEq v6.58.0
  [7792a7ef] StrideArraysCore v0.4.8
  [892a3eda] StringManipulation v0.3.0
  [09ab397b] StructArrays v0.6.14
  [53d494c1] StructIO v0.3.0
  [c3572dad] Sundials v4.15.1
  [2efcf032] SymbolicIndexingInterface v0.2.2
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.10.0
  [62fd8b95] TensorCore v0.1.1
  [5d786b92] TerminalLoggers v0.1.6
  [8290d209] ThreadingUtilities v0.5.1
  [a759f4b9] TimerOutputs v0.5.22
⌃ [9f7883ad] Tracker v0.2.20
  [28d57a85] Transducers v0.4.75
  [a2a6695c] TreeViews v0.3.0
  [d5829a12] TriangularSolve v0.1.19
  [410a4b4d] Tricks v0.1.6
  [781d530d] TruncatedStacktraces v1.1.0
  [3a884ed6] UnPack v1.0.2
  [b8865327] UnicodePlots v3.4.1
  [013be700] UnsafeAtomics v0.2.1
  [d80eeb9a] UnsafeAtomicsLLVM v0.1.0
  [3d5dd08c] VectorizationBase v0.21.60
  [19fa3120] VertexSafeGraphs v0.2.0
  [e88e6eb3] Zygote v0.6.55
  [700de1a5] ZygoteRules v0.2.2
⌅ [7cc45869] Enzyme_jll v0.0.48+1
  [dad2f222] LLVMExtra_jll v0.0.16+2
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
  [f50d1b31] Rmath_jll v0.4.0+0
  [fb77eaff] Sundials_jll v5.2.1+0
  [0dad84c5] ArgTools v1.1.1
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [f43a241f] Downloads v1.6.0
  [7b1f6079] FileWatching
  [9fa8497b] Future
  [b77e0a4c] InteractiveUtils
  [4af54fe1] LazyArtifacts
  [b27032c2] LibCURL v0.6.3
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions v1.2.0
  [44cfe95a] Pkg v1.8.0
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization
  [1a1011a3] SharedArrays
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [4607b0f0] SuiteSparse
  [fa267f1f] TOML v1.0.0
  [a4e569a6] Tar v1.10.1
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll v1.0.1+0
  [deac9b47] LibCURL_jll v7.84.0+0
  [29816b5a] LibSSH2_jll v1.10.2+0
  [c8ffd9c3] MbedTLS_jll v2.28.0+0
  [14a3606d] MozillaCACerts_jll v2022.2.1
  [4536629a] OpenBLAS_jll v0.3.20+0
  [05823500] OpenLibm_jll v0.8.1+0
  [bea87d4a] SuiteSparse_jll v5.10.1+0
  [83775a58] Zlib_jll v1.2.12+3
  [8e850b90] libblastrampoline_jll v5.1.1+0
  [8e850ede] nghttp2_jll v1.48.0+0
  [3f19e933] p7zip_jll v17.4.0+0
Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m`
Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 12 on 12 virtual cores
prbzrg commented 1 year ago

Error:

┌ Warning: ZygoteVJP tried and failed in the automated AD choice algorithm with the following error. (To turn off this printing, add `verbose = false` to the `solve` call)
└ @ SciMLSensitivity C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\concrete_solve.jl:80
Mutating arrays is not supported -- called setindex!(Vector{Float32}, ...)
This error occurs when you ask Zygote to differentiate operations that change
the elements of arrays in place (e.g. setting values with x .= ...)

Possible fixes:
- avoid mutating operations (preferred)
- or read the documentation and solutions for this error
  https://fluxml.ai/Zygote.jl/latest/limitations

┌ Warning: ReverseDiffVJP tried and failed in the automated AD choice algorithm with the following error. (To turn off this printing, add `verbose = false` to the `solve` call)
└ @ SciMLSensitivity C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\concrete_solve.jl:93
MethodError: no method matching gradient(::SciMLSensitivity.var"#255#258"{ODEProblem{Matrix{Float32}, Tuple{Float32, Float32}, false, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}, ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}}, ::Matrix{Float32}, ::ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}})
Closest candidates are:
  gradient(::Any, ::Any) at C:\Users\Hossein Pourbozorg\.julia\packages\ReverseDiff\YkVxM\src\api\gradients.jl:21
  gradient(::Any, ::Any, ::ReverseDiff.GradientConfig) at C:\Users\Hossein Pourbozorg\.julia\packages\ReverseDiff\YkVxM\src\api\gradients.jl:21
┌ Warning: TrackerVJP tried and failed in the automated AD choice algorithm with the following error. (To turn off this printing, add `verbose = false` to the `solve` call)
└ @ SciMLSensitivity C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\concrete_solve.jl:107
UndefRefError: access to undefined reference
┌ Warning: Reverse-Mode AD VJP choices all failed. Falling back to numerical VJPs
└ @ SciMLSensitivity C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\concrete_solve.jl:117
ERROR: LoadError: MethodError: no method matching forwarddiffs_model_time(::Nothing)
Closest candidates are:
  forwarddiffs_model_time(::Union{OrdinaryDiffEq.OrdinaryDiffEqRosenbrockAdaptiveAlgorithm, OrdinaryDiffEq.OrdinaryDiffEqRosenbrockAlgorithm}) at C:\Users\Hossein Pourbozorg\.julia\packages\OrdinaryDiffEq\r3zVj\src\alg_utils.jl:22
  forwarddiffs_model_time(::SciMLBase.AbstractSciMLAlgorithm) at C:\Users\Hossein Pourbozorg\.julia\packages\SciMLBase\zXEYU\src\alg_traits.jl:32
Stacktrace:
  [1] adjointdiffcache(g::Nothing, sensealg::InterpolatingAdjoint{0,false,Val{:central},Bool}, discrete::Bool, sol::SciMLBase.ODESolution{Float32, 3, Vector{Matrix{Float32}}, Nothing, Nothing, Vector{Float32}, Vector{Vector{Matrix{Float32}}}, ODEProblem{Matrix{Float32}, Tuple{Float32, Float32}, false, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}, ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, CompositeAlgorithm{Tuple{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{12,false,LinearSolve.LUFactorization{LinearAlgebra.RowMaximum},OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}},OrdinaryDiffEq.AutoSwitchCache{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{0,false,Nothing,OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}, Rational{Int64}, Int64}}, OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Vector{Matrix{Float32}}, Vector{Float32}, Vector{Vector{Matrix{Float32}}}, CompositeCache{Tuple{OrdinaryDiffEq.Tsit5ConstantCache, OrdinaryDiffEq.TRBDF2ConstantCache{OrdinaryDiffEq.TRBDF2Tableau{Float32, Float32}, OrdinaryDiffEq.NLSolver{OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}}, false, Matrix{Float32}, Float32, Nothing, Float32, OrdinaryDiffEq.NLNewtonConstantCache{Float32, Float32, Matrix{Float32}, LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, SciMLBase.UDerivativeWrapper{ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Float32, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}}}}}},OrdinaryDiffEq.AutoSwitchCache{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{0,false,Nothing,OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}, Rational{Int64}, Int64}}}, DiffEqBase.DEStats, Vector{Int64}}, dgdu::Nothing, dgdp::Nothing, f::ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, alg::Nothing; quad::Bool, noiseterm::Bool, needs_jac::Bool)
    @ SciMLSensitivity C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\adjoint_common.jl:123
  [2] SciMLSensitivity.ODEInterpolatingAdjointSensitivityFunction(g::Nothing, sensealg::InterpolatingAdjoint{0,false,Val{:central},Bool}, discrete::Bool, sol::SciMLBase.ODESolution{Float32, 3, Vector{Matrix{Float32}}, Nothing, Nothing, Vector{Float32}, Vector{Vector{Matrix{Float32}}}, ODEProblem{Matrix{Float32}, Tuple{Float32, Float32}, false, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}, ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, CompositeAlgorithm{Tuple{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{12,false,LinearSolve.LUFactorization{LinearAlgebra.RowMaximum},OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}},OrdinaryDiffEq.AutoSwitchCache{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{0,false,Nothing,OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}, Rational{Int64}, Int64}}, OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Vector{Matrix{Float32}}, Vector{Float32}, Vector{Vector{Matrix{Float32}}}, CompositeCache{Tuple{OrdinaryDiffEq.Tsit5ConstantCache, OrdinaryDiffEq.TRBDF2ConstantCache{OrdinaryDiffEq.TRBDF2Tableau{Float32, Float32}, OrdinaryDiffEq.NLSolver{OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}}, false, Matrix{Float32}, Float32, Nothing, Float32, OrdinaryDiffEq.NLNewtonConstantCache{Float32, Float32, Matrix{Float32}, LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, SciMLBase.UDerivativeWrapper{ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Float32, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}}}}}},OrdinaryDiffEq.AutoSwitchCache{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{0,false,Nothing,OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}, Rational{Int64}, Int64}}}, DiffEqBase.DEStats, Vector{Int64}}, dgdu::Nothing, dgdp::Nothing, f::ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, alg::Nothing, checkpoints::Vector{Float32}, tols::NamedTuple{(:reltol, :abstol), Tuple{Float64, Float64}}, tstops::Nothing; noiseterm::Bool, tspan::Tuple{Float32, Float32})
    @ SciMLSensitivity C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\interpolating_adjoint.jl:106
  [3] ODEAdjointProblem(sol::SciMLBase.ODESolution{Float32, 3, Vector{Matrix{Float32}}, Nothing, Nothing, Vector{Float32}, Vector{Vector{Matrix{Float32}}}, ODEProblem{Matrix{Float32}, Tuple{Float32, Float32}, false, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}, ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, CompositeAlgorithm{Tuple{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{12,false,LinearSolve.LUFactorization{LinearAlgebra.RowMaximum},OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}},OrdinaryDiffEq.AutoSwitchCache{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{0,false,Nothing,OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}, Rational{Int64}, Int64}}, OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Vector{Matrix{Float32}}, Vector{Float32}, Vector{Vector{Matrix{Float32}}}, CompositeCache{Tuple{OrdinaryDiffEq.Tsit5ConstantCache, OrdinaryDiffEq.TRBDF2ConstantCache{OrdinaryDiffEq.TRBDF2Tableau{Float32, Float32}, OrdinaryDiffEq.NLSolver{OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}}, false, Matrix{Float32}, Float32, Nothing, Float32, OrdinaryDiffEq.NLNewtonConstantCache{Float32, Float32, Matrix{Float32}, LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, SciMLBase.UDerivativeWrapper{ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Float32, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}}}}}},OrdinaryDiffEq.AutoSwitchCache{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{0,false,Nothing,OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}, Rational{Int64}, Int64}}}, DiffEqBase.DEStats, Vector{Int64}}, sensealg::InterpolatingAdjoint{0,false,Val{:central},Bool}, alg::Nothing, t::Vector{Float32}, dgdu_discrete::SciMLSensitivity.var"#df_iip#277"{Array{Float32, 3}, Colon}, dgdp_discrete::Nothing, dgdu_continuous::Nothing, dgdp_continuous::Nothing, g::Nothing, ::Val{true}; checkpoints::Vector{Float32}, callback::Nothing, reltol::Float64, abstol::Float64, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:verbose,), Tuple{Bool}}})
    @ SciMLSensitivity C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\interpolating_adjoint.jl:356
  [4] _adjoint_sensitivities(sol::SciMLBase.ODESolution{Float32, 3, Vector{Matrix{Float32}}, Nothing, Nothing, Vector{Float32}, Vector{Vector{Matrix{Float32}}}, ODEProblem{Matrix{Float32}, Tuple{Float32, Float32}, false, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}, ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, CompositeAlgorithm{Tuple{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{12,false,LinearSolve.LUFactorization{LinearAlgebra.RowMaximum},OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}},OrdinaryDiffEq.AutoSwitchCache{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{0,false,Nothing,OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}, Rational{Int64}, Int64}}, OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Vector{Matrix{Float32}}, Vector{Float32}, Vector{Vector{Matrix{Float32}}}, CompositeCache{Tuple{OrdinaryDiffEq.Tsit5ConstantCache, OrdinaryDiffEq.TRBDF2ConstantCache{OrdinaryDiffEq.TRBDF2Tableau{Float32, Float32}, OrdinaryDiffEq.NLSolver{OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}}, false, Matrix{Float32}, Float32, Nothing, Float32, OrdinaryDiffEq.NLNewtonConstantCache{Float32, Float32, Matrix{Float32}, LinearAlgebra.LU{Float32, Matrix{Float32}, Vector{Int64}}, SciMLBase.UDerivativeWrapper{ODEFunction{false,SciMLBase.FullSpecialize,ICNF.var"#f_aug#48"{RNODE{Float32, Array, ZygoteMatrixMode}, NamedTuple{(), Tuple{}}, Matrix{Float32}, Int64},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,typeof(SciMLBase.DEFAULT_OBSERVED),Nothing,Nothing}, Float32, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}}}}}},OrdinaryDiffEq.AutoSwitchCache{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!),typeof(OrdinaryDiffEq.trivial_limiter!),Static.False}, TRBDF2{0,false,Nothing,OrdinaryDiffEq.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}},typeof(OrdinaryDiffEq.DEFAULT_PRECS),Val{:forward},true,nothing}, Rational{Int64}, Int64}}}, DiffEqBase.DEStats, Vector{Int64}}, sensealg::InterpolatingAdjoint{0,false,Val{:central},Bool}, alg::Nothing; t::Vector{Float32}, dgdu_discrete::Function, dgdp_discrete::Nothing, dgdu_continuous::Nothing, dgdp_continuous::Nothing, g::Nothing, abstol::Float64, reltol::Float64, checkpoints::Vector{Float32}, corfunc_analytical::Nothing, callback::Nothing, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:verbose,), Tuple{Bool}}})
    @ SciMLSensitivity C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\sensitivity_interface.jl:407
  [5] #adjoint_sensitivities#67
    @ C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\sensitivity_interface.jl:386 [inlined]
  [6] (::SciMLSensitivity.var"#adjoint_sensitivity_backpass#276"{Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:verbose,), Tuple{Bool}}}, Nothing, InterpolatingAdjoint{0,false,Val{:central},Bool}, Matrix{Float32}, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}, SciMLBase.ChainRulesOriginator, Tuple{}, Colon, NamedTuple{(:verbose,), Tuple{Bool}}})(Δ::Array{Float32, 3})
    @ SciMLSensitivity C:\Users\Hossein Pourbozorg\.julia\packages\SciMLSensitivity\dM3nj\src\concrete_solve.jl:501
  [7] ZBack
    @ C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\chainrules.jl:211 [inlined]
  [8] (::Zygote.var"#208#209"{Tuple{NTuple{4, Nothing}, Tuple{}}, Zygote.ZBack{SciMLSensitivity.var"#adjoint_sensitivity_backpass#276"{Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:verbose,), Tuple{Bool}}}, Nothing, InterpolatingAdjoint{0,false,Val{:central},Bool}, Matrix{Float32}, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}, SciMLBase.ChainRulesOriginator, Tuple{}, Colon, NamedTuple{(:verbose,), Tuple{Bool}}}}})(Δ::Array{Float32, 3})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\lib\lib.jl:206
  [9] (::Zygote.var"#2066#back#210"{Zygote.var"#208#209"{Tuple{NTuple{4, Nothing}, Tuple{}}, Zygote.ZBack{SciMLSensitivity.var"#adjoint_sensitivity_backpass#276"{Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:verbose,), Tuple{Bool}}}, Nothing, InterpolatingAdjoint{0,false,Val{:central},Bool}, Matrix{Float32}, ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}}, SciMLBase.ChainRulesOriginator, Tuple{}, Colon, NamedTuple{(:verbose,), Tuple{Bool}}}}}})(Δ::Array{Float32, 3})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\ZygoteRules\AIbCs\src\adjoint.jl:67 [10] Pullback
    @ C:\Users\Hossein Pourbozorg\.julia\packages\DiffEqBase\JH4gt\src\solve.jl:842 [inlined]
 [11] (::typeof(∂(#solve#27)))(Δ::Array{Float32, 3})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface2.jl:0
 [12] #208
    @ C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\lib\lib.jl:206 [inlined]
 [13] #2066#back
    @ C:\Users\Hossein Pourbozorg\.julia\packages\ZygoteRules\AIbCs\src\adjoint.jl:67 [inlined]
 [14] Pullback
    @ C:\Users\Hossein Pourbozorg\.julia\packages\DiffEqBase\JH4gt\src\solve.jl:832 [inlined]
 [15] (::typeof(∂(solve)))(Δ::Array{Float32, 3})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface2.jl:0
 [16] #208
    @ C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\lib\lib.jl:206 [inlined]
 [17] (::Zygote.var"#2066#back#210"{Zygote.var"#208#209"{Tuple{Tuple{Nothing}, Tuple{}}, typeof(∂(solve))}})(Δ::Array{Float32, 3})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\ZygoteRules\AIbCs\src\adjoint.jl:67 [18] Pullback
    @ C:\Users\Hossein Pourbozorg\.julia\packages\ICNF\uY5I4\src\base_icnf.jl:43 [inlined]
 [19] (::typeof(∂(#inference#6)))(Δ::Tuple{Vector{Float64}, Vector{Float32}, Vector{Float32}})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface2.jl:0
 [20] Pullback
    @ C:\Users\Hossein Pourbozorg\.julia\packages\ICNF\uY5I4\src\base_icnf.jl:27 [inlined]
 [21] (::typeof(∂(inference##kw)))(Δ::Tuple{Vector{Float64}, Vector{Float32}, Vector{Float32}})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface2.jl:0
 [22] Pullback
    @ C:\Users\Hossein Pourbozorg\.julia\packages\ICNF\uY5I4\src\rnode.jl:208 [inlined]
 [23] (::typeof(∂(#loss#59)))(Δ::Float64)
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface2.jl:0
 [24] Pullback
    @ C:\Users\Hossein Pourbozorg\.julia\packages\ICNF\uY5I4\src\rnode.jl:195 [inlined]
 [25] (::typeof(∂(loss)))(Δ::Float64)
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface2.jl:0
 [26] Pullback (repeats 2 times)
    @ C:\Users\Hossein Pourbozorg\.julia\packages\ICNF\uY5I4\src\rnode.jl:195 [inlined]
 [27] Pullback
    @ C:\Users\Hossein Pourbozorg\Code Projects\Mine\bug-find\bf-1\bf-1-2.jl:12 [inlined]
 [28] (::typeof(∂(diff_loss)))(Δ::Float64)
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface2.jl:0
 [29] #208
    @ C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\lib\lib.jl:206 [inlined]
 [30] (::Zygote.var"#2066#back#210"{Zygote.var"#208#209"{Tuple{Tuple{Nothing}}, typeof(∂(diff_loss))}})(Δ::Float64)
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\ZygoteRules\AIbCs\src\adjoint.jl:67 [31] Pullback
    @ .\operators.jl:1035 [inlined]
 [32] (::typeof(∂(#_#95)))(Δ::Vector{Float64})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface2.jl:0
 [33] (::Zygote.var"#208#209"{Tuple{Tuple{Nothing, Nothing}, Tuple{Nothing}}, typeof(∂(#_#95))})(Δ::Vector{Float64})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\lib\lib.jl:206
 [34] #2066#back
    @ C:\Users\Hossein Pourbozorg\.julia\packages\ZygoteRules\AIbCs\src\adjoint.jl:67 [inlined]
 [35] Pullback
    @ .\operators.jl:1033 [inlined]
 [36] (::typeof(∂(ComposedFunction{typeof(Zygote._jvec), typeof(diff_loss)}(Zygote._jvec, diff_loss))))(Δ::Vector{Float64})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface2.jl:0
 [37] (::Zygote.var"#60#61"{typeof(∂(ComposedFunction{typeof(Zygote._jvec), typeof(diff_loss)}(Zygote._jvec, diff_loss)))})(Δ::Vector{Float64})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\compiler\interface.jl:45
 [38] withjacobian(f::Function, args::ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\lib\grad.jl:150
 [39] jacobian(f::Function, args::ComponentVector{Float32, Vector{Float32}, Tuple{Axis{(weight = ViewAxis(1:1, ShapedAxis((1, 1), NamedTuple())), bias = ViewAxis(2:2, ShapedAxis((1, 1), NamedTuple())))}}})
    @ Zygote C:\Users\Hossein Pourbozorg\.julia\packages\Zygote\g2w9o\src\lib\grad.jl:128
 [40] top-level scope
    @ C:\Users\Hossein Pourbozorg\Code Projects\Mine\bug-find\bf-1\bf-1-2.jl:15
in expression starting at C:\Users\Hossein Pourbozorg\Code Projects\Mine\bug-find\bf-1\bf-1-2.jl:15
prbzrg commented 1 year ago

If we use ForwardDiffSensitivity, it works.

icnf = construct(RNODE, nn, 1; compute_mode=ZygoteMatrixMode, sol_kwargs = Dict(:sensealg => ForwardDiffSensitivity()))
prbzrg commented 1 year ago

Strangely, a smaller dataset makes it work.

r = rand(Float32, 1, 8)
prbzrg commented 1 year ago

Related to https://github.com/SciML/DiffEqFlux.jl/issues/814

prbzrg commented 1 year ago

Reported in https://github.com/SciML/SciMLSensitivity.jl/issues/907 and Fixes by https://github.com/SciML/DiffEqBase.jl/pull/937