Skip to content

Commit a6bc37b

Browse files
author
Documenter.jl
committed
delete history
0 parents  commit a6bc37b

File tree

169 files changed

+36884
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+36884
-0
lines changed

dev/.documenter-siteinfo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"documenter":{"julia_version":"1.11.6","generation_timestamp":"2025-07-29T12:19:49","documenter_version":"1.14.1"}}

dev/api/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>API · ModelingToolkitNeuralNets.jl</title><meta name="title" content="API · ModelingToolkitNeuralNets.jl"/><meta property="og:title" content="API · ModelingToolkitNeuralNets.jl"/><meta property="twitter:title" content="API · ModelingToolkitNeuralNets.jl"/><meta name="description" content="Documentation for ModelingToolkitNeuralNets.jl."/><meta property="og:description" content="Documentation for ModelingToolkitNeuralNets.jl."/><meta property="twitter:description" content="Documentation for ModelingToolkitNeuralNets.jl."/><meta property="og:url" content="https://docs.sciml.ai/ModelingToolkitNeuralNets.jl/stable/api/"/><meta property="twitter:url" content="https://docs.sciml.ai/ModelingToolkitNeuralNets.jl/stable/api/"/><link rel="canonical" href="https://docs.sciml.ai/ModelingToolkitNeuralNets.jl/stable/api/"/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="ModelingToolkitNeuralNets.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">ModelingToolkitNeuralNets.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Tutorials</span><ul><li><a class="tocitem" href="../nnblock/">NeuralNetworkBlock</a></li><li><a class="tocitem" href="../friction/">Friction Model</a></li></ul></li><li class="is-active"><a class="tocitem" href>API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>API</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/SciML/ModelingToolkitNeuralNets.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/SciML/ModelingToolkitNeuralNets.jl/blob/main/docs/src/api.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="API"><a class="docs-heading-anchor" href="#API">API</a><a id="API-1"></a><a class="docs-heading-anchor-permalink" href="#API" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="ModelingToolkitNeuralNets.NeuralNetworkBlock" href="#ModelingToolkitNeuralNets.NeuralNetworkBlock"><code>ModelingToolkitNeuralNets.NeuralNetworkBlock</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">NeuralNetworkBlock(; n_input = 1, n_output = 1,
3+
chain = multi_layer_feed_forward(n_input, n_output),
4+
rng = Xoshiro(0),
5+
init_params = Lux.initialparameters(rng, chain),
6+
eltype = Float64,
7+
name)</code></pre><p>Create a component neural network as a <code>System</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/ModelingToolkitNeuralNets.jl/blob/8207a0a017bde0a6075e3f9e316cedec8f224e3e/src/ModelingToolkitNeuralNets.jl#L15-L24">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="ModelingToolkitNeuralNets.SymbolicNeuralNetwork" href="#ModelingToolkitNeuralNets.SymbolicNeuralNetwork"><code>ModelingToolkitNeuralNets.SymbolicNeuralNetwork</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">SymbolicNeuralNetwork(; n_input = 1, n_output = 1,
8+
chain = multi_layer_feed_forward(n_input, n_output),
9+
rng = Xoshiro(0),
10+
init_params = Lux.initialparameters(rng, chain),
11+
nn_name = :NN,
12+
nn_p_name = :p,
13+
eltype = Float64)</code></pre><p>Create symbolic parameter for a neural network and one for its parameters. Example:</p><pre><code class="nohighlight hljs">chain = multi_layer_feed_forward(2, 2)
14+
NN, p = SymbolicNeuralNetwork(; chain, n_input=2, n_output=2, rng = StableRNG(42))</code></pre><p>The NN and p are symbolic parameters that can be used later as part of a system. To change the name of the symbolic variables, use <code>nn_name</code> and <code>nn_p_name</code>. To get the predictions of the neural network, use</p><pre><code class="nohighlight hljs">pred ~ NN(input, p)</code></pre><p>where <code>pred</code> and <code>input</code> are a symbolic vector variable with the lengths <code>n_output</code> and <code>n_input</code>.</p><p>To use this outside of an equation, you can get the default values for the symbols and make a similar call</p><pre><code class="nohighlight hljs">defaults(sys)[sys.NN](input, nn_p)</code></pre><p>where <code>sys</code> is a system (e.g. <code>ODESystem</code>) that contains <code>NN</code>, <code>input</code> is a vector of <code>n_input</code> length and <code>nn_p</code> is a vector representing parameter values for the neural network.</p><p>To get the underlying Lux model you can use <code>get_network(defaults(sys)[sys.NN])</code> or</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/ModelingToolkitNeuralNets.jl/blob/8207a0a017bde0a6075e3f9e316cedec8f224e3e/src/ModelingToolkitNeuralNets.jl#L61-L98">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="ModelingToolkitNeuralNets.multi_layer_feed_forward" href="#ModelingToolkitNeuralNets.multi_layer_feed_forward"><code>ModelingToolkitNeuralNets.multi_layer_feed_forward</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">multi_layer_feed_forward(; n_input, n_output, width::Int = 4,
15+
depth::Int = 1, activation = tanh, use_bias = true, initial_scaling_factor = 1e-8)</code></pre><p>Create a Lux.jl <code>Chain</code> for use in <a href="#ModelingToolkitNeuralNets.NeuralNetworkBlock"><code>NeuralNetworkBlock</code></a>s. The weights of the last layer are multipled by the <code>initial_scaling_factor</code> in order to make the initial contribution of the network small and thus help with acheiving a stable starting position for the training.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/ModelingToolkitNeuralNets.jl/blob/8207a0a017bde0a6075e3f9e316cedec8f224e3e/src/utils.jl#L1-L8">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../friction/">« Friction Model</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Tuesday 29 July 2025 12:19">Tuesday 29 July 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)