Skip to content

Commit c4d2e8c

Browse files
committed
docs
1 parent 00f8714 commit c4d2e8c

File tree

101 files changed

+11457
-7216
lines changed

Some content is hidden

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

101 files changed

+11457
-7216
lines changed

docs/RWKV/index.html

Lines changed: 174 additions & 175 deletions
Large diffs are not rendered by default.

docs/activations/fta/experiment.html

Lines changed: 78 additions & 79 deletions
Large diffs are not rendered by default.

docs/activations/swish.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@
7474
</div>
7575
<div class='code'>
7676
<div class="highlight"><pre><span class="lineno">1</span><span></span><span class="kn">import</span> <span class="nn">torch</span>
77-
<span class="lineno">2</span><span class="kn">from</span> <span class="nn">torch</span> <span class="kn">import</span> <span class="n">nn</span>
78-
<span class="lineno">3</span>
79-
<span class="lineno">4</span><span class="kn">from</span> <span class="nn">labml_helpers.module</span> <span class="kn">import</span> <span class="n">Module</span></pre></div>
77+
<span class="lineno">2</span><span class="kn">from</span> <span class="nn">torch</span> <span class="kn">import</span> <span class="n">nn</span></pre></div>
8078
</div>
8179
</div>
8280
<div class='section' id='section-1'>
@@ -87,7 +85,7 @@
8785

8886
</div>
8987
<div class='code'>
90-
<div class="highlight"><pre><span class="lineno">7</span><span class="k">class</span> <span class="nc">Swish</span><span class="p">(</span><span class="n">Module</span><span class="p">):</span></pre></div>
88+
<div class="highlight"><pre><span class="lineno">6</span><span class="k">class</span> <span class="nc">Swish</span><span class="p">(</span><span class="n">nn</span><span class="o">.</span><span class="n">Module</span><span class="p">):</span></pre></div>
9189
</div>
9290
</div>
9391
<div class='section' id='section-2'>
@@ -98,9 +96,9 @@
9896

9997
</div>
10098
<div class='code'>
101-
<div class="highlight"><pre><span class="lineno">8</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
102-
<span class="lineno">9</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
103-
<span class="lineno">10</span> <span class="bp">self</span><span class="o">.</span><span class="n">sigmoid</span> <span class="o">=</span> <span class="n">nn</span><span class="o">.</span><span class="n">Sigmoid</span><span class="p">()</span></pre></div>
99+
<div class="highlight"><pre><span class="lineno">7</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
100+
<span class="lineno">8</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
101+
<span class="lineno">9</span> <span class="bp">self</span><span class="o">.</span><span class="n">sigmoid</span> <span class="o">=</span> <span class="n">nn</span><span class="o">.</span><span class="n">Sigmoid</span><span class="p">()</span></pre></div>
104102
</div>
105103
</div>
106104
<div class='section' id='section-3'>
@@ -111,8 +109,8 @@
111109

112110
</div>
113111
<div class='code'>
114-
<div class="highlight"><pre><span class="lineno">12</span> <span class="k">def</span> <span class="nf">forward</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">:</span>
115-
<span class="lineno">13</span> <span class="k">return</span> <span class="n">x</span> <span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">sigmoid</span><span class="p">(</span><span class="n">x</span><span class="p">)</span></pre></div>
112+
<div class="highlight"><pre><span class="lineno">11</span> <span class="k">def</span> <span class="nf">forward</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">:</span>
113+
<span class="lineno">12</span> <span class="k">return</span> <span class="n">x</span> <span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">sigmoid</span><span class="p">(</span><span class="n">x</span><span class="p">)</span></pre></div>
116114
</div>
117115
</div>
118116
<div class='footer'>

docs/adaptive_computation/ponder_net/experiment.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ <h1><a href="index.html">PonderNet</a> <a href="../parity.html">Parity Task</a>
8383
<span class="lineno">17</span><span class="kn">from</span> <span class="nn">torch.utils.data</span> <span class="kn">import</span> <span class="n">DataLoader</span>
8484
<span class="lineno">18</span>
8585
<span class="lineno">19</span><span class="kn">from</span> <span class="nn">labml</span> <span class="kn">import</span> <span class="n">tracker</span><span class="p">,</span> <span class="n">experiment</span>
86-
<span class="lineno">20</span><span class="kn">from</span> <span class="nn">labml_helpers.metrics.accuracy</span> <span class="kn">import</span> <span class="n">AccuracyDirect</span>
87-
<span class="lineno">21</span><span class="kn">from</span> <span class="nn">labml_helpers.train_valid</span> <span class="kn">import</span> <span class="n">SimpleTrainValidConfigs</span><span class="p">,</span> <span class="n">BatchIndex</span>
86+
<span class="lineno">20</span><span class="kn">from</span> <span class="nn">labml_nn.helpers.metrics</span> <span class="kn">import</span> <span class="n">AccuracyDirect</span>
87+
<span class="lineno">21</span><span class="kn">from</span> <span class="nn">labml_nn.helpers.trainer</span> <span class="kn">import</span> <span class="n">SimpleTrainValidConfigs</span><span class="p">,</span> <span class="n">BatchIndex</span>
8888
<span class="lineno">22</span><span class="kn">from</span> <span class="nn">labml_nn.adaptive_computation.parity</span> <span class="kn">import</span> <span class="n">ParityDataset</span>
8989
<span class="lineno">23</span><span class="kn">from</span> <span class="nn">labml_nn.adaptive_computation.ponder_net</span> <span class="kn">import</span> <span class="n">ParityPonderGRU</span><span class="p">,</span> <span class="n">ReconstructionLoss</span><span class="p">,</span> <span class="n">RegularizationLoss</span></pre></div>
9090
</div>
@@ -94,7 +94,7 @@ <h1><a href="index.html">PonderNet</a> <a href="../parity.html">Parity Task</a>
9494
<div class='section-link'>
9595
<a href='#section-1'>#</a>
9696
</div>
97-
<p> Configurations with a <a href="https://docs.labml.ai/api/helpers.html#labml_helpers.train_valid.SimpleTrainValidConfigs">simple training loop</a></p>
97+
<p> Configurations with a <a href="../../helpers/trainer.html">simple training loop</a></p>
9898

9999
</div>
100100
<div class='code'>

0 commit comments

Comments
 (0)