Skip to content

Commit

Permalink
deploy: de6bfba
Browse files Browse the repository at this point in the history
  • Loading branch information
ulises-jeremias committed Nov 12, 2023
1 parent f30a3de commit 2a2061d
Show file tree
Hide file tree
Showing 20 changed files with 153 additions and 297 deletions.
24 changes: 8 additions & 16 deletions autograd.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -36,7 +36,7 @@
<div class="info">
<div class="module">vtl</div>
<div class="toggle-version-container">
<span>0.2.0 48a1d6c</span>
<span>0.2.0 fbb43f5</span>
<div
id="dark-mode-toggle"
role="switch"
Expand Down Expand Up @@ -166,8 +166,7 @@
<span class="token comment">// backward(payload &Payload<T>) []&vtl.Tensor<T></span>
<span class="token comment">// cache(mut result Variable<T>, args ...CacheParam)</span>
<span class="token punctuation">}</span></code></pre>
<p>Gate is an object that can cache the result of an operation, as well as backpropogate a payload backwards along the computational graph</p>
<p>Structs that implement from this interface can add instance variables if additional caching is needed, and these need to be populated when writing the cached operation TODO: Make this generic once it works as expected</p>
<p>Gate is an object that can cache the result of an operation, as well as backpropogate a payload backwards along the computational graph</p><p>Structs that implement from this interface can add instance variables if additional caching is needed, and these need to be populated when writing the cached operation TODO: Make this generic once it works as expected</p>

</section>
<section id="AddGate[T].backward" class="doc-node">
Expand Down Expand Up @@ -307,10 +306,7 @@
</section>
<section id="Variable[T].backprop" class="doc-node">
<div class="title"><h2>fn (Variable[T]) backprop <a href="#Variable[T].backprop">#</a></h2><a class="link" rel="noreferrer" target="_blank" href="https://github.com/vlang/vtl/blob/master/vtl/autograd/variable.v#L74"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg></a></div><pre class="signature"><code><span class="token keyword">fn</span> <span class="token punctuation">(</span><span class="token keyword">mut</span> v Variable<span class="token punctuation">[</span><span class="token builtin">T</span><span class="token punctuation">]</span><span class="token punctuation">)</span> backprop<span class="token punctuation">[</span><span class="token builtin">T</span><span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">!</span></code></pre>
<p>backprop Back propogates an operation along a computational graph.<br>
This operation will destroy the operational graph, populating the gradients for all variables that are predecessors of
the Variable this is called on.<br>
Even if this is called on the first node in a graph, it will destroy all descendents of this variable stored by the Context</p>
<p>backprop Back propogates an operation along a computational graph.<br />This operation will destroy the operational graph, populating the gradients for all variables that are predecessors ofthe Variable this is called on.<br />Even if this is called on the first node in a graph, it will destroy all descendents of this variable stored by the Context</p>

</section>
<section id="Variable[T].cos" class="doc-node">
Expand Down Expand Up @@ -393,8 +389,7 @@
<span class="token comment">// be cached, and backpropogation will not be possible</span>
no_grad <span class="token builtin">bool</span>
<span class="token punctuation">}</span></code></pre>
<p>Context keeps track of the computational graph for a number of operations. Variables that interact with each other must belong to the same context, or state will be
lost while tracking operations done.</p>
<p>Context keeps track of the computational graph for a number of operations. Variables that interact with each other must belong to the same context, or state will belost while tracking operations done.</p>

</section>
<section id="ContextVariableData" class="doc-node">
Expand Down Expand Up @@ -461,8 +456,7 @@
<span class="token comment">// Debug use only, contains a name for a node</span>
name <span class="token builtin">string</span>
<span class="token punctuation">}</span></code></pre>
<p>Node is a member of a computational graph that contains a reference to a gate, as well as the parents of the operation
and the payload that resulted from the operation.</p>
<p>Node is a member of a computational graph that contains a reference to a gate, as well as the parents of the operationand the payload that resulted from the operation.</p>

</section>
<section id="Payload" class="doc-node">
Expand Down Expand Up @@ -523,9 +517,7 @@
<span class="token comment">// forward operations</span>
requires_grad <span class="token builtin">bool</span>
<span class="token punctuation">}</span></code></pre>
<p>Variable is an abstraction of a vtl.Tensor that tracks the operations done to the vtl.Tensor. It also keeps track of the gradient of the operation if a Variable
needs to backpropogate.<br>
This is the fundamental object used in automatic differentiation, as well as the neural network aspects of VTL</p>
<p>Variable is an abstraction of a vtl.Tensor that tracks the operations done to the vtl.Tensor. It also keeps track of the gradient of the operation if a Variableneeds to backpropogate.<br />This is the fundamental object used in automatic differentiation, as well as the neural network aspects of VTL</p>

</section>
<section id="VariableData" class="doc-node">
Expand All @@ -536,7 +528,7 @@

</section>

<div class="footer">Powered by vdoc. Generated on: 21 Oct 2023 16:39:34</div>
<div class="footer">Powered by vdoc. Generated on: 12 Nov 2023 21:38:31</div>
</div>
<div class="doc-toc"><ul><li class="open"><a href="#add_gate">fn add_gate</a> <ul>
</ul>
Expand Down
15 changes: 4 additions & 11 deletions datasets.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -36,7 +36,7 @@
<div class="info">
<div class="module">vtl</div>
<div class="toggle-version-container">
<span>0.2.0 48a1d6c</span>
<span>0.2.0 fbb43f5</span>
<div
id="dark-mode-toggle"
role="switch"
Expand Down Expand Up @@ -67,14 +67,7 @@
<div class="doc-container">
<div class="doc-content">
<section id="readme_datasets" class="doc-node">
<div class="title"><h1> datasets <a href="#readme_datasets">#</a></h1></div><h1>VTL Datasets</h1>
<p>This module exposes some functionalities to download and use the VTL datasets.
For this we created some batch based iterators to load the datasets.
We expose the following datasets:</p>
<ul>
<li><strong>Mnist</strong>: A dataset of handwritten digits.</li>
<li><strong>Imdb</strong>: A dataset of IMDB reviews for sentiment analysis.</li>
</ul>
<div class="title"><h1> datasets <a href="#readme_datasets">#</a></h1></div><h1>VTL Datasets</h1><p>This module exposes some functionalities to download and use the VTL datasets.For this we created some batch based iterators to load the datasets.We expose the following datasets:</p><ul><li><strong>Mnist</strong>: A dataset of handwritten digits.</li><li><strong>Imdb</strong>: A dataset of IMDB reviews for sentiment analysis.</li></ul>

</section>

Expand Down Expand Up @@ -135,7 +128,7 @@

</section>

<div class="footer">Powered by vdoc. Generated on: 21 Oct 2023 16:39:34</div>
<div class="footer">Powered by vdoc. Generated on: 12 Nov 2023 21:38:31</div>
</div>
<div class="doc-toc"><ul><li class="open"><a href="#readme_datasets">README</a></li>
<li class="open"><a href="#Constants">Constants</a></li>
Expand Down
33 changes: 29 additions & 4 deletions doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,30 @@ html {
}
body {
margin: 0;
font-family: Jost, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
font-family:
Jost,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Helvetica,
Arial,
sans-serif,
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol';
background-color: #fff;
background-color: var(--background-color);
color: #000;
color: var(--text-color);
height: 100%;
}
hr {
height: 0.25rem;
background-color: var(--title-bottom-line-color);
border: 0;
padding: 0;
margin: 1.2rem 0;
}
#page {
height: 100%;
padding-top: 56px;
Expand Down Expand Up @@ -337,8 +353,17 @@ body {
font-weight: 500;
}
.doc-nav > .search .result > .link > .description {
font-family: Jost, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
font-family:
Jost,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Helvetica,
Arial,
sans-serif,
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol';
font-size: 0.75rem;
overflow: hidden;
white-space: nowrap;
Expand Down
2 changes: 1 addition & 1 deletion doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function setupScrollSpy() {
a.classList.add('active');
lastActive = a;
clickedScroll = true;
})
}),
);
}

Expand Down
66 changes: 11 additions & 55 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -36,7 +36,7 @@
<div class="info">
<div class="module">vtl</div>
<div class="toggle-version-container">
<span>0.2.0 48a1d6c</span>
<span>0.2.0 fbb43f5</span>
<div
id="dark-mode-toggle"
role="switch"
Expand Down Expand Up @@ -69,67 +69,23 @@
<section id="README" class="doc-node">
<div class="title"><h1> README</h1></div><div align="center">
<h1>The V Tensor Library</h1>
<p><a href="https://vlang.io">vlang.io</a> |
<a href="https://vlang.github.io/vtl">Docs</a> |
<a href="https://github.com/vlang/vtl/blob/main/docs/TUTORIAL.md">Tutorials</a> |
<a href="#">Changelog</a> |
<a href="https://github.com/vlang/vtl/blob/main/CONTRIBUTING.md">Contributing</a></p>
</div>
<p><a href="https://vlang.io">vlang.io</a> |<a href="https://vlang.github.io/vtl">Docs</a> |<a href="https://github.com/vlang/vtl/blob/main/docs/TUTORIAL.md">Tutorials</a> |<a href="#">Changelog</a> |<a href="https://github.com/vlang/vtl/blob/main/CONTRIBUTING.md">Contributing</a></p></div>
<div align="center">
<p><a href="https://github.com/vlang/awesome-v/blob/master/README.md#scientific-computing"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome V"></a>
<a href="https://github.com/vlang/vtl/actions/workflows/ci.yml"><img src="https://github.com/vlang/vtl/actions/workflows/ci.yml/badge.svg" alt="Continuous Integration"></a>
<a href="https://github.com/vlang/vtl/actions/workflows/deploy-docs.yml"><img src="https://github.com/vlang/vtl/actions/workflows/deploy-docs.yml/badge.svg" alt="Deploy Documentation"></a>
<a href="https://github.com/vlang/vtl/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a></p>
</div>
<pre><code class="language-v">&gt;&gt;&gt; import vtl
&gt;&gt;&gt; t := vtl.from_array([1.0, 2, 3, 4], [2, 2])!
&gt;&gt;&gt; t.get([1, 1])
4.0
</code></pre>
<h2>VTL Provides</h2>
<ul>
<li>An n-dimensional <code>Tensor</code> data structure</li>
<li>Sophisticated reduction, elementwise, and accumulation operations</li>
<li>Data Structures that can easily be passed to C libraries</li>
<li>Powerful linear algebra routines backed by VSL.</li>
</ul>
<p>In the <a href="https://vlang.github.io/vtl">docs</a> you can find more information about this module</p>
<h2>Installation</h2>
<h3>Install dependencies (optional)</h3>
<p>We use <a href="https://github.com/vlang/vsl">VSL</a> as backend for some functionalities.
VTL requires VSL's linear algebra module.
If you wish you to use vtl without these, the <code>vtl</code> module will still function as normal.</p>
<p>Follow this <a href="https://github.com/vlang/vsl#install-vsl-locally">install instructions</a>
at VSL docs in order to install VSL with all needed dependencies.</p>
<h3>Install VTL</h3>
<pre><code class="language-sh">v install vtl
</code></pre>
<p>Done. Installation completed.</p>
<h2>Testing</h2>
<p>To test the module, just type the following command:</p>
<pre><code class="language-sh">v test .
</code></pre>
<h2>License</h2>
<p><a href="LICENSE">MIT</a></p>
<h2>Contributors</h2>
<blockquote>
<p>This work was originally based on the work done by
Christopher (<a href="https://github.com/christopherzimmerman">christopherzimmerman</a>).</p>
</blockquote>
<blockquote>
<p>The development of this library continues its course after having reimplemented its core
and a large part of its interface. In the same way, we do not want to stop recognizing
the work and inspiration that the library done by Christopher has given.</p>
</blockquote>
<a href="https://github.com/vlang/vtl/contributors">
<p><a href="https://github.com/vlang/awesome-v/blob/master/README.md#scientific-computing"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome V" /></a><a href="https://github.com/vlang/vtl/actions/workflows/ci.yml"><img src="https://github.com/vlang/vtl/actions/workflows/ci.yml/badge.svg" alt="Continuous Integration" /></a><a href="https://github.com/vlang/vtl/actions/workflows/deploy-docs.yml"><img src="https://github.com/vlang/vtl/actions/workflows/deploy-docs.yml/badge.svg" alt="Deploy Documentation" /></a><a href="https://github.com/vlang/vtl/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" /></a></p></div>
<pre><code class="language-v"><span class="token operator">&</span>gt<span class="token punctuation">;</span><span class="token operator">&</span>gt<span class="token punctuation">;</span><span class="token operator">&</span>gt<span class="token punctuation">;</span> <span class="token keyword">import</span> vtl
<span class="token operator">&</span>gt<span class="token punctuation">;</span><span class="token operator">&</span>gt<span class="token punctuation">;</span><span class="token operator">&</span>gt<span class="token punctuation">;</span> t <span class="token operator">:=</span> vtl<span class="token punctuation">.</span><span class="token function">from_array</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token number">1.0</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token operator">!</span>
<span class="token operator">&</span>gt<span class="token punctuation">;</span><span class="token operator">&</span>gt<span class="token punctuation">;</span><span class="token operator">&</span>gt<span class="token punctuation">;</span> t<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token number">4.0</span></code></pre><h2>VTL Provides</h2><ul><li>An n-dimensional <code>Tensor</code> data structure</li><li>Sophisticated reduction, elementwise, and accumulation operations</li><li>Data Structures that can easily be passed to C libraries</li><li>Powerful linear algebra routines backed by VSL.</li></ul><p>In the <a href="https://vlang.github.io/vtl">docs</a> you can find more information about this module</p><h2>Installation</h2><h3>Install dependencies (optional)</h3><p>We use <a href="https://github.com/vlang/vsl">VSL</a> as backend for some functionalities.VTL requires VSL's linear algebra module.If you wish you to use vtl without these, the <code>vtl</code> module will still function as normal.</p><p>Follow this <a href="https://github.com/vlang/vsl#install-vsl-locally">install instructions</a>at VSL docs in order to install VSL with all needed dependencies.</p><h3>Install VTL</h3><pre><code class="language-sh">v install vtl
</code></pre><p>Done. Installation completed.</p><h2>Testing</h2><p>To test the module, just type the following command:</p><pre><code class="language-sh">v test .
</code></pre><h2>License</h2><p><a href="LICENSE">MIT</a></p><h2>Contributors</h2><blockquote><p>This work was originally based on the work done byChristopher (<a href="https://github.com/christopherzimmerman">christopherzimmerman</a>).</p></blockquote><blockquote><p>The development of this library continues its course after having reimplemented its coreand a large part of its interface. In the same way, we do not want to stop recognizingthe work and inspiration that the library done by Christopher has given.</p></blockquote><a href="https://github.com/vlang/vtl/contributors">
<img src="https://contrib.rocks/image?repo=vlang/vtl"/>
</a>
<p>Made with <a href="https://contrib.rocks">contributors-img</a>.</p>

</section>


<div class="footer">Powered by vdoc. Generated on: 21 Oct 2023 16:39:34</div>
<div class="footer">Powered by vdoc. Generated on: 12 Nov 2023 21:38:31</div>
</div>

</div>
Expand Down
6 changes: 3 additions & 3 deletions la.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -36,7 +36,7 @@
<div class="info">
<div class="module">vtl</div>
<div class="toggle-version-container">
<span>0.2.0 48a1d6c</span>
<span>0.2.0 fbb43f5</span>
<div
id="dark-mode-toggle"
role="switch"
Expand Down Expand Up @@ -92,7 +92,7 @@

</section>

<div class="footer">Powered by vdoc. Generated on: 21 Oct 2023 16:39:34</div>
<div class="footer">Powered by vdoc. Generated on: 12 Nov 2023 21:38:31</div>
</div>
<div class="doc-toc"><ul><li class="open"><a href="#det">fn det</a> <ul>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions ml.metrics.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -36,7 +36,7 @@
<div class="info">
<div class="module">vtl</div>
<div class="toggle-version-container">
<span>0.2.0 48a1d6c</span>
<span>0.2.0 fbb43f5</span>
<div
id="dark-mode-toggle"
role="switch"
Expand Down Expand Up @@ -107,7 +107,7 @@

</section>

<div class="footer">Powered by vdoc. Generated on: 21 Oct 2023 16:39:34</div>
<div class="footer">Powered by vdoc. Generated on: 12 Nov 2023 21:38:31</div>
</div>
<div class="doc-toc"><ul><li class="open"><a href="#absolute_error">fn absolute_error</a> <ul>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions nn.gates.activation.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -36,7 +36,7 @@
<div class="info">
<div class="module">vtl</div>
<div class="toggle-version-container">
<span>0.2.0 48a1d6c</span>
<span>0.2.0 fbb43f5</span>
<div
id="dark-mode-toggle"
role="switch"
Expand Down Expand Up @@ -164,7 +164,7 @@

</section>

<div class="footer">Powered by vdoc. Generated on: 21 Oct 2023 16:39:34</div>
<div class="footer">Powered by vdoc. Generated on: 12 Nov 2023 21:38:31</div>
</div>
<div class="doc-toc"><ul><li class="open"><a href="#elu_gate">fn elu_gate</a> <ul>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions nn.gates.layers.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -36,7 +36,7 @@
<div class="info">
<div class="module">vtl</div>
<div class="toggle-version-container">
<span>0.2.0 48a1d6c</span>
<span>0.2.0 fbb43f5</span>
<div
id="dark-mode-toggle"
role="switch"
Expand Down Expand Up @@ -192,7 +192,7 @@

</section>

<div class="footer">Powered by vdoc. Generated on: 21 Oct 2023 16:39:34</div>
<div class="footer">Powered by vdoc. Generated on: 12 Nov 2023 21:38:31</div>
</div>
<div class="doc-toc"><ul><li class="open"><a href="#dropout_gate">fn dropout_gate</a> <ul>
</ul>
Expand Down
Loading

0 comments on commit 2a2061d

Please sign in to comment.