From b19a988241779ee5f43a4ed31105687c7bf935d4 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 12 Sep 2024 05:46:57 +0000 Subject: [PATCH] build based on 4cbb2f5 --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 2 +- dev/assets/Manifest.toml | 132 ++++------ dev/assets/Project.toml | 2 +- dev/friction/{b0e625ad.svg => 2c937b88.svg} | 270 ++++++++++---------- dev/friction/{3bb56eb1.svg => a974e118.svg} | 268 +++++++++---------- dev/friction/{6ca1510a.svg => b41f059d.svg} | 264 +++++++++---------- dev/friction/{fb9bdfff.svg => cc41e81e.svg} | 264 +++++++++---------- dev/friction/index.html | 80 +++--- dev/index.html | 54 ++-- dev/objects.inv | Bin 433 -> 433 bytes 11 files changed, 655 insertions(+), 683 deletions(-) rename dev/friction/{b0e625ad.svg => 2c937b88.svg} (69%) rename dev/friction/{3bb56eb1.svg => a974e118.svg} (69%) rename dev/friction/{6ca1510a.svg => b41f059d.svg} (75%) rename dev/friction/{fb9bdfff.svg => cc41e81e.svg} (76%) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 76b928f..2eab829 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-07T15:48:57","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-12T05:46:54","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 7ead35c..9d1379d 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -4,4 +4,4 @@ rng = Xoshiro(0), init_params = Lux.initialparameters(rng, chain), eltype = Float64, - name)

Create an ODESystem with a neural network inside.

source + name)

Create an ODESystem with a neural network inside.

source diff --git a/dev/assets/Manifest.toml b/dev/assets/Manifest.toml index 6dee130..0e17540 100644 --- a/dev/assets/Manifest.toml +++ b/dev/assets/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.10.5" manifest_format = "2.0" -project_hash = "3106a16b6a6ccbe66b04eb174abb3e455fe5f7f9" +project_hash = "2effa7037721d9a5627b5eab5b7385fe26c4afbc" [[deps.ADTypes]] git-tree-sha1 = "99a6f5d0ce1c7c6afdb759daa30226f71c54f6b0" @@ -157,9 +157,9 @@ version = "0.1.6" [[deps.BlockArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "5c0ffe1dff8cb7112de075f1b1cb32191675fcba" +git-tree-sha1 = "d434647f798823bcae510aee0bc0401927f64391" uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.1.0" +version = "1.1.1" [deps.BlockArrays.extensions] BlockArraysBandedMatricesExt = "BandedMatrices" @@ -290,9 +290,9 @@ version = "1.1.1+0" [[deps.ComponentArrays]] deps = ["ArrayInterface", "ChainRulesCore", "ForwardDiff", "Functors", "LinearAlgebra", "PackageExtensionCompat", "StaticArrayInterface", "StaticArraysCore"] -git-tree-sha1 = "cf30651e65a87b20b12601b91169a18838eab2df" +git-tree-sha1 = "bc391f0c19fa242fb6f71794b949e256cfa3772c" uuid = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" -version = "0.15.16" +version = "0.15.17" [deps.ComponentArrays.extensions] ComponentArraysAdaptExt = "Adapt" @@ -422,9 +422,9 @@ version = "0.4.2" [[deps.DiffEqBase]] deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces"] -git-tree-sha1 = "d7d43a1cc11dc4e4e5378816ae720fccd75a77c8" +git-tree-sha1 = "fa7d580038451a8df4434ef5b079ac9b2d486194" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.155.0" +version = "6.155.1" [deps.DiffEqBase.extensions] DiffEqBaseCUDAExt = "CUDA" @@ -1082,9 +1082,9 @@ version = "3.0.0+1" [[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Requires", "Unicode"] -git-tree-sha1 = "b351d72436ddecd27381a07c242ba27282a6c8a7" +git-tree-sha1 = "4ad43cb0a4bb5e5b1506e1d1f48646d7e0c80363" uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "9.0.0" +version = "9.1.2" [deps.LLVM.extensions] BFloat16sExt = "BFloat16s" @@ -1094,15 +1094,15 @@ version = "9.0.0" [[deps.LLVMExtra_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] -git-tree-sha1 = "f42bec1e12f42ec251541f6d0482d520a4638b17" +git-tree-sha1 = "05a8bd5a42309a9ec82f700876903abce1017dd3" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" -version = "0.0.33+0" +version = "0.0.34+0" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e16271d212accd09d52ee0ae98956b8a05c4b626" +git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "17.0.6+0" +version = "18.1.7+0" [[deps.LZO_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1364,14 +1364,13 @@ version = "0.11.2" CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" [[deps.Lux]] -deps = ["ADTypes", "Adapt", "ArgCheck", "ArrayInterface", "ChainRulesCore", "Compat", "ConcreteStructs", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Functors", "GPUArraysCore", "LinearAlgebra", "LossFunctions", "LuxCore", "LuxDeviceUtils", "LuxLib", "MLDataDevices", "MacroTools", "Markdown", "NNlib", "Optimisers", "Preferences", "Random", "Reexport", "SIMDTypes", "Setfield", "Static", "StaticArraysCore", "Statistics", "UnrolledUtilities", "VectorizationBase", "WeightInitializers"] -git-tree-sha1 = "3f8af8f7100dcbe952ed7f588ef51568d7c9c02b" +deps = ["ADTypes", "Adapt", "ArgCheck", "ArrayInterface", "ChainRulesCore", "Compat", "ConcreteStructs", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Functors", "GPUArraysCore", "LinearAlgebra", "LossFunctions", "LuxCore", "LuxLib", "MLDataDevices", "MacroTools", "Markdown", "NNlib", "Optimisers", "Preferences", "Random", "Reexport", "SIMDTypes", "Setfield", "Static", "StaticArraysCore", "Statistics", "UnrolledUtilities", "VectorizationBase", "WeightInitializers"] +git-tree-sha1 = "388a675b6b1f9e881e03f9dc1e5abe8c41c8648a" uuid = "b2108857-7c20-44ae-9111-449ecde12c47" -version = "0.5.68" +version = "1.0.1" [deps.Lux.extensions] LuxComponentArraysExt = "ComponentArrays" - LuxDynamicExpressionsExt = "DynamicExpressions" LuxEnzymeExt = "Enzyme" LuxFluxExt = "Flux" LuxMLUtilsExt = "MLUtils" @@ -1385,7 +1384,6 @@ version = "0.5.68" [deps.Lux.weakdeps] CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" - DynamicExpressions = "a40a106e-89c9-4ca8-8020-a735e8728b6b" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" @@ -1398,65 +1396,35 @@ version = "0.5.68" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.LuxCore]] -deps = ["Compat", "DispatchDoctor", "Functors", "Random", "Setfield"] -git-tree-sha1 = "43aa0d448e99c16d452bfbac1f27acd2cbcf4ef1" +deps = ["Compat", "DispatchDoctor", "Random"] +git-tree-sha1 = "bc76e84caf579c21cb3b8dfa39cc9db12f5bc470" uuid = "bb33d45b-7691-41d6-9220-0943567d0623" -version = "0.1.25" +version = "1.0.0" [deps.LuxCore.extensions] LuxCoreArrayInterfaceReverseDiffExt = ["ArrayInterface", "ReverseDiff"] LuxCoreArrayInterfaceTrackerExt = ["ArrayInterface", "Tracker"] LuxCoreChainRulesCoreExt = "ChainRulesCore" LuxCoreEnzymeCoreExt = "EnzymeCore" + LuxCoreFunctorsExt = "Functors" LuxCoreMLDataDevicesExt = "MLDataDevices" + LuxCoreSetfieldExt = "Setfield" [deps.LuxCore.weakdeps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196" MLDataDevices = "7e8f7934-dd98-4c1a-8fe8-92b47a384d40" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" -[[deps.LuxDeviceUtils]] -deps = ["Adapt", "ChainRulesCore", "Functors", "LuxCore", "Preferences", "Random", "UnrolledUtilities"] -git-tree-sha1 = "494db99a113c3a5a0b637d788a65494732f4558e" -uuid = "34f89e08-e1d5-43b4-8944-0b49ac560553" -version = "0.1.27" - - [deps.LuxDeviceUtils.extensions] - LuxDeviceUtilsAMDGPUExt = "AMDGPU" - LuxDeviceUtilsCUDAExt = "CUDA" - LuxDeviceUtilsFillArraysExt = "FillArrays" - LuxDeviceUtilsGPUArraysExt = "GPUArrays" - LuxDeviceUtilsLuxCUDAExt = "LuxCUDA" - LuxDeviceUtilsMetalExt = ["GPUArrays", "Metal"] - LuxDeviceUtilsRecursiveArrayToolsExt = "RecursiveArrayTools" - LuxDeviceUtilsReverseDiffExt = "ReverseDiff" - LuxDeviceUtilsSparseArraysExt = "SparseArrays" - LuxDeviceUtilsTrackerExt = "Tracker" - LuxDeviceUtilsZygoteExt = "Zygote" - LuxDeviceUtilsoneAPIExt = ["GPUArrays", "oneAPI"] - - [deps.LuxDeviceUtils.weakdeps] - AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" - GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" - LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda" - Metal = "dde4c033-4e86-420c-a63e-0dd931031962" - RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b" - [[deps.LuxLib]] deps = ["ArrayInterface", "ChainRulesCore", "Compat", "CpuId", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Hwloc", "KernelAbstractions", "LinearAlgebra", "LoopVectorization", "LuxCore", "MLDataDevices", "Markdown", "NNlib", "Octavian", "Polyester", "Random", "Reexport", "SLEEFPirates", "Static", "StaticArraysCore", "Statistics", "UnrolledUtilities"] -git-tree-sha1 = "ccba7c272e6f96758be8da15eb0083f52b032307" +git-tree-sha1 = "c5a0dc5e8791c2a4b2c3b1d34c50cff523bb7fca" uuid = "82251201-b29d-42c6-8e01-566dec8acb11" -version = "0.3.51" +version = "1.2.0" [deps.LuxLib.extensions] LuxLibAppleAccelerateExt = "AppleAccelerate" @@ -1485,14 +1453,15 @@ uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" version = "2024.2.0+0" [[deps.MLDataDevices]] -deps = ["Adapt", "ChainRulesCore", "Functors", "Preferences", "Random", "UnrolledUtilities"] -git-tree-sha1 = "4e95d61ec696fc8e697616f2926ca64963e366b1" +deps = ["Adapt", "Functors", "Preferences", "Random"] +git-tree-sha1 = "bf8bca6f9f9fa3fa984ba5d358595033f0aace2a" uuid = "7e8f7934-dd98-4c1a-8fe8-92b47a384d40" -version = "1.1.0" +version = "1.1.1" [deps.MLDataDevices.extensions] MLDataDevicesAMDGPUExt = "AMDGPU" MLDataDevicesCUDAExt = "CUDA" + MLDataDevicesChainRulesCoreExt = "ChainRulesCore" MLDataDevicesFillArraysExt = "FillArrays" MLDataDevicesGPUArraysExt = "GPUArrays" MLDataDevicesMLUtilsExt = "MLUtils" @@ -1508,6 +1477,7 @@ version = "1.1.0" [deps.MLDataDevices.weakdeps] AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54" @@ -1645,9 +1615,9 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.ModelingToolkit]] deps = ["AbstractTrees", "ArrayInterface", "BlockArrays", "Combinatorics", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "DiffRules", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "ExprTools", "Expronicon", "FindFirstFunctions", "ForwardDiff", "FunctionWrappersWrappers", "Graphs", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "NaNMath", "NonlinearSolve", "OrderedCollections", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] -git-tree-sha1 = "757b0673761363a8a9689098c967e5296b3a5117" +git-tree-sha1 = "bc5164aa274590945239c84b198fd5ce475a4772" uuid = "961ee093-0014-501f-94e3-6117800e7a78" -version = "9.37.0" +version = "9.39.1" [deps.ModelingToolkit.extensions] MTKBifurcationKitExt = "BifurcationKit" @@ -1665,13 +1635,13 @@ version = "9.37.0" deps = ["ComponentArrays", "Lux", "LuxCore", "ModelingToolkit", "ModelingToolkitStandardLibrary", "Random", "Symbolics"] path = "/home/runner/work/ModelingToolkitNeuralNets.jl/ModelingToolkitNeuralNets.jl" uuid = "f162e290-f571-43a6-83d9-22ecc16da15f" -version = "1.3.0" +version = "1.5.0" [[deps.ModelingToolkitStandardLibrary]] deps = ["ChainRulesCore", "DiffEqBase", "IfElse", "LinearAlgebra", "ModelingToolkit", "Symbolics"] -git-tree-sha1 = "e45ea9a9183d8d3b888a614bd5230262c443cc4f" +git-tree-sha1 = "6120377d051db22e1cd00d9d54eb3f749a65b7fa" uuid = "16a59e39-deab-5bd0-87e4-056b12336739" -version = "2.11.0" +version = "2.12.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" @@ -1921,15 +1891,15 @@ version = "1.1.0" [[deps.OrdinaryDiffEqBDF]] deps = ["ArrayInterface", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqSDIRK", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "f24c26cab671309428636643f0f540fb7360bbaa" +git-tree-sha1 = "b4498d40bf35da0b6d22652ff2e9d8820590b3c6" uuid = "6ad6398a-0878-4a85-9266-38940aa047c8" -version = "1.1.1" +version = "1.1.2" [[deps.OrdinaryDiffEqCore]] deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "TruncatedStacktraces"] -git-tree-sha1 = "35fdf60f6b5e283ea2292d3f1c57abce6175c406" +git-tree-sha1 = "5595eb94d0dd3cde2f5cf456394a1e0a61237e95" uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" -version = "1.5.1" +version = "1.6.0" weakdeps = ["EnzymeCore"] [deps.OrdinaryDiffEqCore.extensions] @@ -1967,9 +1937,9 @@ version = "1.1.0" [[deps.OrdinaryDiffEqFIRK]] deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "SciMLOperators"] -git-tree-sha1 = "92deb4a8e4a2bc011fd3b919e858d7a16568d3b1" +git-tree-sha1 = "795221c662698851328cb7787965ab4a180d9468" uuid = "5960d6e9-dd7a-4743-88e7-cf307b64f125" -version = "1.1.0" +version = "1.1.1" [[deps.OrdinaryDiffEqFeagin]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] @@ -2449,9 +2419,9 @@ version = "0.6.43" [[deps.SciMLBase]] deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "Expronicon", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "303a73db99326a8be43e695fbab9e076b02118ca" +git-tree-sha1 = "c96f81c3e98d5e2f0848fb42aba4383d772c3bb7" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.52.2" +version = "2.53.1" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -2726,14 +2696,14 @@ version = "3.6.0" [[deps.Symbolics]] deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "IfElse", "LaTeXStrings", "LambertW", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] -git-tree-sha1 = "97896df13c86ebd3ecbc445c313819f923b8e8a3" +git-tree-sha1 = "2226d810512c678d2ec9c2a9b2e227c2ebc43573" uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "6.7.0" +version = "6.11.0" [deps.Symbolics.extensions] SymbolicsForwardDiffExt = "ForwardDiff" SymbolicsGroebnerExt = "Groebner" - SymbolicsLuxCoreExt = "LuxCore" + SymbolicsLuxExt = "Lux" SymbolicsNemoExt = "Nemo" SymbolicsPreallocationToolsExt = ["PreallocationTools", "ForwardDiff"] SymbolicsSymPyExt = "SymPy" @@ -2741,7 +2711,7 @@ version = "6.7.0" [deps.Symbolics.weakdeps] ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4" - LuxCore = "bb33d45b-7691-41d6-9220-0943567d0623" + Lux = "b2108857-7c20-44ae-9111-449ecde12c47" Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a" PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" @@ -2880,9 +2850,13 @@ uuid = "a7c27f48-0311-42f6-a7f8-2c11e75eb415" version = "0.1.6" [[deps.UnrolledUtilities]] -git-tree-sha1 = "b73f7a7c25a2618c5052c80ed32b07e471cc6cb0" +git-tree-sha1 = "d0b2aa2d71fa2f4494cb3cf69719a6807ea0df40" uuid = "0fe1646c-419e-43be-ac14-22321958931b" -version = "0.1.2" +version = "0.1.4" +weakdeps = ["StaticArrays"] + + [deps.UnrolledUtilities.extensions] + UnrolledUtilitiesStaticArraysExt = "StaticArrays" [[deps.UnsafeAtomics]] git-tree-sha1 = "6331ac3440856ea1988316b46045303bef658278" diff --git a/dev/assets/Project.toml b/dev/assets/Project.toml index 92889db..a00bb49 100644 --- a/dev/assets/Project.toml +++ b/dev/assets/Project.toml @@ -14,7 +14,7 @@ ModelingToolkitNeuralNets = "f162e290-f571-43a6-83d9-22ecc16da15f" [compat] Documenter = "1.3" -Lux = "0.5.32" +Lux = "1" ModelingToolkit = "9.9" ModelingToolkitStandardLibrary = "2.7" Optimization = "3.24" diff --git a/dev/friction/b0e625ad.svg b/dev/friction/2c937b88.svg similarity index 69% rename from dev/friction/b0e625ad.svg rename to dev/friction/2c937b88.svg index 161f49c..62c0648 100644 --- a/dev/friction/b0e625ad.svg +++ b/dev/friction/2c937b88.svg @@ -1,149 +1,149 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/friction/3bb56eb1.svg b/dev/friction/a974e118.svg similarity index 69% rename from dev/friction/3bb56eb1.svg rename to dev/friction/a974e118.svg index ffcc3d4..6422fb2 100644 --- a/dev/friction/3bb56eb1.svg +++ b/dev/friction/a974e118.svg @@ -1,148 +1,148 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/friction/6ca1510a.svg b/dev/friction/b41f059d.svg similarity index 75% rename from dev/friction/6ca1510a.svg rename to dev/friction/b41f059d.svg index 585584e..723bdd3 100644 --- a/dev/friction/6ca1510a.svg +++ b/dev/friction/b41f059d.svg @@ -1,146 +1,146 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/friction/fb9bdfff.svg b/dev/friction/cc41e81e.svg similarity index 76% rename from dev/friction/fb9bdfff.svg rename to dev/friction/cc41e81e.svg index b2e05d4..236cb6a 100644 --- a/dev/friction/fb9bdfff.svg +++ b/dev/friction/cc41e81e.svg @@ -1,146 +1,146 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/friction/index.html b/dev/friction/index.html index 59a85b6..1b829e8 100644 --- a/dev/friction/index.html +++ b/dev/friction/index.html @@ -72,7 +72,7 @@ [8.965808955089017] [9.04079394249597] [9.115490076324514] - [9.18990042447709]

Let's plot it.

scatter(sol_ref, label = "velocity")
Example block output

That was the velocity. Let's also plot the friction force acting on the object throughout the simulation.

scatter(sol_ref.t, friction.(first.(sol_ref.u)), label = "friction force")
Example block output

Model Setup

Now, we will try to learn the same friction model using a neural network. We will use NeuralNetworkBlock to define neural network as a component. The input of the neural network is the velocity and the output is the friction force. We connect the neural network with the model using RealInputArray and RealOutputArray blocks.

function friction_ude(Fu)
+ [9.18990042447709]

Let's plot it.

scatter(sol_ref, label = "velocity")
Example block output

That was the velocity. Let's also plot the friction force acting on the object throughout the simulation.

scatter(sol_ref.t, friction.(first.(sol_ref.u)), label = "friction force")
Example block output

Model Setup

Now, we will try to learn the same friction model using a neural network. We will use NeuralNetworkBlock to define neural network as a component. The input of the neural network is the velocity and the output is the friction force. We connect the neural network with the model using RealInputArray and RealOutputArray blocks.

function friction_ude(Fu)
     @variables y(t) = 0.0
     @constants Fu = Fu
     @named nn_in = RealInputArray(nin = 1)
@@ -131,26 +131,26 @@
 op = OptimizationProblem(of, x0, (prob, sol_ref, get_vars, get_refs))
 res = solve(op, Adam(5e-3); maxiters = 10000, callback = cb)
retcode: Default
 u: 120-element Vector{Float64}:
- -2.423965246422264
- -2.389870055748775
-  1.1112592447429877
- -1.9431216853164623
-  0.748581145013487
- -2.3634238464622284
-  0.5181052037803907
- -0.17995883919046124
- -2.435797492730028
- -2.432986756178753
+ -2.3636356168896393
+ -2.4192743320056964
+  2.0553216024376972
+ -0.299925206928586
+  0.9657348367786275
+ -2.4086786498364874
+ -2.321253697551076
+  0.5512956241338778
+ -2.436006830074837
+ -2.4256518875480806
   ⋮
- -1.1097321751448963
-  0.9360569679386752
-  0.08533204603874663
- -0.3834927673182644
-  1.5587951594990925
-  1.3488284090594305
- -0.8027046157017986
- -1.1330954958932196
-  0.9593681730647837

Visualization of results

We now have a trained neural network! We can check whether running the simulation of the model embedded with the neural network matches the data or not.

res_p = SciMLStructures.replace(Tunable(), prob.p, res.u)
+ -2.1175791469580205
+  1.231137921763269
+ -1.0464754889905168
+ -0.25115604090898497
+ -1.5963390506010442
+  1.453488833212753
+ -2.2825358674620055
+ -1.411365516380704
+ -1.5278017288524202

Visualization of results

We now have a trained neural network! We can check whether running the simulation of the model embedded with the neural network matches the data or not.

res_p = SciMLStructures.replace(Tunable(), prob.p, res.u)
 res_prob = remake(prob, p = res_p)
 res_sol = solve(res_prob, Rodas4(), saveat = sol_ref.t)

Also, it would be interesting to check the simulation before the training to get an idea of the starting point of the network.

initial_sol = solve(prob, Rodas4(), saveat = sol_ref.t)
retcode: Success
 Interpolation: 1st order linear
@@ -177,26 +177,26 @@
  0.1
 u: 101-element Vector{Vector{Float64}}:
  [0.0, 0.0]
- [0.12001081871228214, 0.12001081871228214]
- [0.240043440328915, 0.240043440328915]
- [0.360098160447955, 0.360098160447955]
- [0.480175289667169, 0.48017528966716905]
- [0.6002752784412242, 0.6002752784412243]
- [0.7203984526777717, 0.7203984526777718]
- [0.8405449086275836, 0.8405449086275836]
- [0.9607147425414322, 0.9607147425414322]
- [1.0809079666986676, 1.0809079666986676]
+ [0.12001891802081019, 0.12001891802081031]
+ [0.24007647700874993, 0.2400764770087498]
+ [0.3601739747963031, 0.3601739747963031]
+ [0.4803131095522974, 0.4803131095522974]
+ [0.6004927757805316, 0.6004927757805316]
+ [0.7207126193354306, 0.7207126193354306]
+ [0.8409730643006613, 0.8409730643006613]
+ [0.9612712084093116, 0.9612712084093116]
+ [1.0816044728150558, 1.0816044728150558]
  ⋮
- [11.113594079032303, 11.113594079032303]
- [11.234984106232307, 11.234984106232307]
- [11.356377742649215, 11.356377742649215]
- [11.477782208621669, 11.477782208621669]
- [11.5991975277462, 11.5991975277462]
- [11.720623723619342, 11.720623723619342]
- [11.842060819837624, 11.842060819837624]
- [11.963508839997575, 11.963508839997575]
- [12.084967807695728, 12.084967807695728]

Now we plot it.

scatter(sol_ref, idxs = [model_true.y], label = "ground truth velocity")
+ [11.145787875140721, 11.145787875140721]
+ [11.267953036793134, 11.267953036793134]
+ [11.39014155188266, 11.39014155188266]
+ [11.512353442687392, 11.51235344268739]
+ [11.634588731485419, 11.634588731485419]
+ [11.756847440554838, 11.756847440554838]
+ [11.879129592173735, 11.879129592173735]
+ [12.001435208620208, 12.001435208620206]
+ [12.123764312172343, 12.123764312172343]

Now we plot it.

scatter(sol_ref, idxs = [model_true.y], label = "ground truth velocity")
 plot!(res_sol, idxs = [sys.friction.y], label = "velocity after training")
-plot!(initial_sol, idxs = [sys.friction.y], label = "velocity before training")
Example block output

It matches the data well! Let's also check the predictions for the friction force and whether the network learnt the friction model or not.

scatter(sol_ref.t, friction.(first.(sol_ref.u)), label = "ground truth friction")
+plot!(initial_sol, idxs = [sys.friction.y], label = "velocity before training")
Example block output

It matches the data well! Let's also check the predictions for the friction force and whether the network learnt the friction model or not.

scatter(sol_ref.t, friction.(first.(sol_ref.u)), label = "ground truth friction")
 plot!(res_sol.t, getindex.(res_sol[sys.nn.output.u], 1),
-    label = "friction from neural network")
Example block output

It learns the friction model well!

+ label = "friction from neural network")Example block output

It learns the friction model well!

diff --git a/dev/index.html b/dev/index.html index c37998a..9a7da1c 100644 --- a/dev/index.html +++ b/dev/index.html @@ -2,18 +2,17 @@ Home · ModelingToolkitNeuralNets.jl

ModelingToolkitNeuralNets.jl

ModelingToolkitNeuralNets.jl is a package to create neural network components defined similar to MTKStandardLibrary components, to use them for solving Universal Differential Equations. It can be plugged to any part of the equations in an ODESystem using RealInputArray and RealOutputArray components which gives a lot of flexibility to add missing physics only to the relevant parts of the model.

Installation

To install ModelingToolkitNeuralNets.jl, use the Julia package manager:

using Pkg
 Pkg.add("ModelingToolkitNeuralNets")

Contributing

Reproducibility

The documentation of this SciML package was built using these direct dependencies,
Status `~/work/ModelingToolkitNeuralNets.jl/ModelingToolkitNeuralNets.jl/docs/Project.toml`
   [e30172f5] Documenter v1.7.0
-⌅ [b2108857] Lux v0.5.68
-  [961ee093] ModelingToolkit v9.37.0
-  [f162e290] ModelingToolkitNeuralNets v1.3.0 `~/work/ModelingToolkitNeuralNets.jl/ModelingToolkitNeuralNets.jl`
-  [16a59e39] ModelingToolkitStandardLibrary v2.11.0
+  [b2108857] Lux v1.0.1
+  [961ee093] ModelingToolkit v9.39.1
+  [f162e290] ModelingToolkitNeuralNets v1.5.0 `~/work/ModelingToolkitNeuralNets.jl/ModelingToolkitNeuralNets.jl`
+  [16a59e39] ModelingToolkitStandardLibrary v2.12.0
   [7f7a1694] Optimization v3.28.0
   [42dfb2eb] OptimizationOptimisers v0.2.1
   [1dea7af3] OrdinaryDiffEq v6.89.0
   [91a5bcdd] Plots v1.40.8
   [53ae85a6] SciMLStructures v1.5.0
   [860ef19b] StableRNGs v1.0.2
-  [2efcf032] SymbolicIndexingInterface v0.3.30
-Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated`
and using this machine and Julia version.
Julia Version 1.10.5
+  [2efcf032] SymbolicIndexingInterface v0.3.30
and using this machine and Julia version.
Julia Version 1.10.5
 Commit 6f3fdf7b362 (2024-08-27 14:19 UTC)
 Build Info:
   Official https://julialang.org/ release
@@ -41,7 +40,7 @@
   [e2ed5e7c] Bijections v0.1.9
   [d1d4a3ce] BitFlags v0.1.9
   [62783981] BitTwiddlingConvenienceFunctions v0.1.6
-  [8e7c35d0] BlockArrays v1.1.0
+  [8e7c35d0] BlockArrays v1.1.1
   [fa961155] CEnum v0.5.0
   [2a0fbf3d] CPUSummary v0.2.6
   [00ebfdb7] CSTParser v3.4.3
@@ -58,7 +57,7 @@
   [bbf7d656] CommonSubexpressions v0.3.1
   [f70d9fcc] CommonWorldInvalidations v1.0.0
   [34da2185] Compat v4.16.0
-  [b0b7db55] ComponentArrays v0.15.16
+  [b0b7db55] ComponentArrays v0.15.17
   [b152e2b5] CompositeTypes v0.1.4
   [a33af91c] CompositionsBase v0.1.2
   [2569d6c7] ConcreteStructs v0.2.3
@@ -74,7 +73,7 @@
   [e2d170a0] DataValueInterfaces v1.0.0
   [8bb1440f] DelimitedFiles v1.9.1
   [85a47980] Dictionaries v0.4.2
-  [2b5f629d] DiffEqBase v6.155.0
+  [2b5f629d] DiffEqBase v6.155.1
   [459566f4] DiffEqCallbacks v3.9.1
   [77a26b50] DiffEqNoiseProcess v5.23.0
   [163ba53b] DiffResults v1.1.0
@@ -140,7 +139,7 @@
   [2c470bb0] Kronecker v0.5.5
   [ba0b0d4f] Krylov v0.9.6
   [5be7bae1] LBFGSB v0.4.1
-  [929cbde3] LLVM v9.0.0
+  [929cbde3] LLVM v9.1.2
   [b964fa9f] LaTeXStrings v1.3.1
   [984bce1d] LambertW v0.4.6
   [23fbe1c1] Latexify v0.16.5
@@ -155,11 +154,10 @@
   [e6f89c97] LoggingExtras v1.0.3
   [bdcacae8] LoopVectorization v0.12.171
   [30fc2ffe] LossFunctions v0.11.2
-⌅ [b2108857] Lux v0.5.68
-⌅ [bb33d45b] LuxCore v0.1.25
-  [34f89e08] LuxDeviceUtils v0.1.27
-⌅ [82251201] LuxLib v0.3.51
-  [7e8f7934] MLDataDevices v1.1.0
+  [b2108857] Lux v1.0.1
+  [bb33d45b] LuxCore v1.0.0
+  [82251201] LuxLib v1.2.0
+  [7e8f7934] MLDataDevices v1.1.1
   [d8e11817] MLStyle v0.4.17
   [1914dd2f] MacroTools v0.5.13
   [af67fdf4] ManifoldDiff v0.3.12
@@ -172,9 +170,9 @@
   [739be429] MbedTLS v1.1.9
   [442fdcdd] Measures v0.3.2
   [e1d29d7a] Missings v1.2.0
-  [961ee093] ModelingToolkit v9.37.0
-  [f162e290] ModelingToolkitNeuralNets v1.3.0 `~/work/ModelingToolkitNeuralNets.jl/ModelingToolkitNeuralNets.jl`
-  [16a59e39] ModelingToolkitStandardLibrary v2.11.0
+  [961ee093] ModelingToolkit v9.39.1
+  [f162e290] ModelingToolkitNeuralNets v1.5.0 `~/work/ModelingToolkitNeuralNets.jl/ModelingToolkitNeuralNets.jl`
+  [16a59e39] ModelingToolkitStandardLibrary v2.12.0
   [46d2c3a1] MuladdMacro v0.2.4
   [102ac46a] MultivariatePolynomials v0.5.6
   [d8a4904e] MutableArithmetics v1.4.6
@@ -194,14 +192,14 @@
   [bac558e1] OrderedCollections v1.6.3
   [1dea7af3] OrdinaryDiffEq v6.89.0
   [89bda076] OrdinaryDiffEqAdamsBashforthMoulton v1.1.0
-  [6ad6398a] OrdinaryDiffEqBDF v1.1.1
-  [bbf590c4] OrdinaryDiffEqCore v1.5.1
+  [6ad6398a] OrdinaryDiffEqBDF v1.1.2
+  [bbf590c4] OrdinaryDiffEqCore v1.6.0
   [50262376] OrdinaryDiffEqDefault v1.1.0
   [4302a76b] OrdinaryDiffEqDifferentiation v1.1.0
   [9286f039] OrdinaryDiffEqExplicitRK v1.1.0
   [e0540318] OrdinaryDiffEqExponentialRK v1.1.0
   [becaefa8] OrdinaryDiffEqExtrapolation v1.1.0
-  [5960d6e9] OrdinaryDiffEqFIRK v1.1.0
+  [5960d6e9] OrdinaryDiffEqFIRK v1.1.1
   [101fe9f7] OrdinaryDiffEqFeagin v1.1.0
   [d3585ca7] OrdinaryDiffEqFunctionMap v1.1.1
   [d28bc4f8] OrdinaryDiffEqHighOrderRK v1.1.0
@@ -257,11 +255,11 @@
   [05181044] RelocatableFolders v1.0.1
   [ae029012] Requires v1.3.0
   [ae5879a3] ResettableStacks v1.1.1
-  [79098fc4] Rmath v0.7.1
+⌅ [79098fc4] Rmath v0.7.1
   [7e49a35a] RuntimeGeneratedFunctions v0.5.13
   [94e857df] SIMDTypes v0.1.0
   [476501e8] SLEEFPirates v0.6.43
-  [0bca4576] SciMLBase v2.52.2
+  [0bca4576] SciMLBase v2.53.1
   [c0aeaf25] SciMLOperators v0.3.10
   [53ae85a6] SciMLStructures v1.5.0
   [6c6a2e73] Scratch v1.2.1
@@ -290,7 +288,7 @@
   [2efcf032] SymbolicIndexingInterface v0.3.30
   [19f23fe9] SymbolicLimits v0.2.2
   [d1185830] SymbolicUtils v3.6.0
-  [0c5d862f] Symbolics v6.7.0
+  [0c5d862f] Symbolics v6.11.0
   [3783bdb8] TableTraits v1.0.1
   [bd369af6] Tables v1.12.0
   [62fd8b95] TensorCore v0.1.1
@@ -310,7 +308,7 @@
   [1986cc42] Unitful v1.21.0
   [45397f5d] UnitfulLatexify v1.6.4
   [a7c27f48] Unityper v0.1.6
-  [0fe1646c] UnrolledUtilities v0.1.2
+  [0fe1646c] UnrolledUtilities v0.1.4
   [013be700] UnsafeAtomics v0.2.1
   [d80eeb9a] UnsafeAtomicsLLVM v0.2.1
   [41fe7b60] Unzip v0.2.0
@@ -339,8 +337,8 @@
   [aacddb02] JpegTurbo_jll v3.0.3+0
   [c1c5ebd0] LAME_jll v3.100.2+0
 ⌅ [88015f11] LERC_jll v3.0.0+1
-  [dad2f222] LLVMExtra_jll v0.0.33+0
-  [1d63c593] LLVMOpenMP_jll v17.0.6+0
+  [dad2f222] LLVMExtra_jll v0.0.34+0
+  [1d63c593] LLVMOpenMP_jll v18.1.7+0
   [dd4b983a] LZO_jll v2.10.2+0
   [81d17ec3] L_BFGS_B_jll v3.0.1+0
 ⌅ [e9f186c6] Libffi_jll v3.2.2+1
@@ -458,4 +456,4 @@
   [8e850b90] libblastrampoline_jll v5.11.0+0
   [8e850ede] nghttp2_jll v1.52.0+1
   [3f19e933] p7zip_jll v17.4.0+2
-Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`

You can also download the manifest file and the project file.

+Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`

You can also download the manifest file and the project file.

diff --git a/dev/objects.inv b/dev/objects.inv index 881d5da85a0be92aa46ab0c2b1abbdaeb73efb00..01a19f66d2dd72c94b64e8e3287d198a1ed55559 100644 GIT binary patch delta 12 TcmdnUypefA5TohF;5bGA8^r_U delta 12 TcmdnUypefA5To(N;5bGA8@mJI