|
42 | 42 | </form>
|
43 | 43 | </div>
|
44 | 44 | </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
45 |
| - <p class="caption" role="heading"><span class="caption-text">Setup</span></p> |
| 45 | + <p class="caption" role="heading"><span class="caption-text">Getting started</span></p> |
46 | 46 | <ul>
|
47 | 47 | <li class="toctree-l1"><a class="reference internal" href="../Setup/setup.html">Installation and Setup</a></li>
|
48 | 48 | </ul>
|
| 49 | +<p class="caption" role="heading"><span class="caption-text">Usage</span></p> |
| 50 | +<ul> |
| 51 | +<li class="toctree-l1"><a class="reference internal" href="../Guide/usage.html">Verification</a></li> |
| 52 | +</ul> |
49 | 53 | <p class="caption" role="heading"><span class="caption-text">API Documentation</span></p>
|
50 | 54 | <ul class="current">
|
51 | 55 | <li class="toctree-l1"><a class="reference internal" href="0_Networks.html">Networks</a></li>
|
52 | 56 | <li class="toctree-l1"><a class="reference internal" href="1_Nodes.html">Nodes</a></li>
|
53 | 57 | <li class="toctree-l1 current"><a class="current reference internal" href="#">Training</a><ul>
|
54 | 58 | <li class="toctree-l2"><a class="reference internal" href="#pynever.strategies.training.TrainingStrategy"><code class="docutils literal notranslate"><span class="pre">TrainingStrategy</span></code></a><ul>
|
55 | 59 | <li class="toctree-l3"><a class="reference internal" href="#pynever.strategies.training.TrainingStrategy.train"><code class="docutils literal notranslate"><span class="pre">TrainingStrategy.train()</span></code></a></li>
|
56 |
| -<li class="toctree-l3"><a class="reference internal" href="#id0"><code class="docutils literal notranslate"><span class="pre">TrainingStrategy.train()</span></code></a></li> |
57 | 60 | </ul>
|
58 | 61 | </li>
|
59 | 62 | <li class="toctree-l2"><a class="reference internal" href="#pynever.strategies.training.TestingStrategy"><code class="docutils literal notranslate"><span class="pre">TestingStrategy</span></code></a><ul>
|
60 | 63 | <li class="toctree-l3"><a class="reference internal" href="#pynever.strategies.training.TestingStrategy.test"><code class="docutils literal notranslate"><span class="pre">TestingStrategy.test()</span></code></a></li>
|
61 |
| -<li class="toctree-l3"><a class="reference internal" href="#id1"><code class="docutils literal notranslate"><span class="pre">TestingStrategy.test()</span></code></a></li> |
62 | 64 | </ul>
|
63 | 65 | </li>
|
64 | 66 | <li class="toctree-l2"><a class="reference internal" href="#pynever.strategies.training.PytorchTraining"><code class="docutils literal notranslate"><span class="pre">PytorchTraining</span></code></a><ul>
|
|
119 | 121 |
|
120 | 122 | <section id="module-pynever.strategies.training">
|
121 | 123 | <span id="training"></span><h1>Training<a class="headerlink" href="#module-pynever.strategies.training" title="Link to this heading"></a></h1>
|
| 124 | +<p>This module contains the classes to train neural networks. It follows the Strategy design pattern providing the abstract |
| 125 | +interfaces <code class="docutils literal notranslate"><span class="pre">TrainingStrategy</span></code> and <code class="docutils literal notranslate"><span class="pre">TestingStrategy</span></code>. |
| 126 | +At the moment, we provide only a single training and testing strategy using PyTorch.</p> |
122 | 127 | <dl class="py class">
|
123 | 128 | <dt class="sig sig-object py" id="pynever.strategies.training.TrainingStrategy">
|
124 | 129 | <em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pynever.strategies.training.</span></span><span class="sig-name descname"><span class="pre">TrainingStrategy</span></span><a class="reference internal" href="../_modules/pynever/strategies/training.html#TrainingStrategy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pynever.strategies.training.TrainingStrategy" title="Link to this definition"></a></dt>
|
125 | 130 | <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">ABC</span></code></p>
|
126 | 131 | <p>An abstract class used to represent a Training Strategy.</p>
|
127 | 132 | <dl class="py method">
|
128 | 133 | <dt class="sig sig-object py" id="pynever.strategies.training.TrainingStrategy.train">
|
129 |
| -<span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">NeuralNetwork</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Dataset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pynever/strategies/training.html#TrainingStrategy.train"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pynever.strategies.training.TrainingStrategy.train" title="Link to this definition"></a></dt> |
130 |
| -<dd><p>Train the neural network of interest using a training strategy determined in the concrete children.</p> |
131 |
| -</dd></dl> |
132 |
| - |
133 |
| -<dl class="py method"> |
134 |
| -<dt class="sig sig-object py" id="id0"> |
135 |
| -<em class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">network</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pynever/strategies/training.html#TrainingStrategy.train"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#id0" title="Link to this definition"></a></dt> |
| 134 | +<em class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">network</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pynever/strategies/training.html#TrainingStrategy.train"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pynever.strategies.training.TrainingStrategy.train" title="Link to this definition"></a></dt> |
136 | 135 | <dd><p>Train the neural network of interest using a testing strategy determined in the concrete children.</p>
|
137 | 136 | <dl class="field-list simple">
|
138 | 137 | <dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
160 | 159 | <p>An abstract class used to represent a Testing Strategy.</p>
|
161 | 160 | <dl class="py method">
|
162 | 161 | <dt class="sig sig-object py" id="pynever.strategies.training.TestingStrategy.test">
|
163 |
| -<span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">NeuralNetwork</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Dataset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pynever/strategies/training.html#TestingStrategy.test"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pynever.strategies.training.TestingStrategy.test" title="Link to this definition"></a></dt> |
164 |
| -<dd><p>Test the neural network of interest using a testing strategy determined in the concrete children.</p> |
165 |
| -</dd></dl> |
166 |
| - |
167 |
| -<dl class="py method"> |
168 |
| -<dt class="sig sig-object py" id="id1"> |
169 |
| -<em class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">network</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pynever/strategies/training.html#TestingStrategy.test"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#id1" title="Link to this definition"></a></dt> |
| 162 | +<em class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">test</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">network</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dataset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pynever/strategies/training.html#TestingStrategy.test"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pynever.strategies.training.TestingStrategy.test" title="Link to this definition"></a></dt> |
170 | 163 | <dd><p>Test the neural network of interest using a testing strategy determined in the concrete children.</p>
|
171 | 164 | <dl class="field-list simple">
|
172 | 165 | <dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
220 | 213 | <dt class="sig sig-object py" id="pynever.strategies.training.PytorchTraining.loss_function">
|
221 | 214 | <span class="sig-name descname"><span class="pre">loss_function</span></span><a class="headerlink" href="#pynever.strategies.training.PytorchTraining.loss_function" title="Link to this definition"></a></dt>
|
222 | 215 | <dd><p>Loss function for the training strategy. We assume it to take as parameters two pytorch Tensor
|
223 |
| -corresponding to the output of the network and the target. Other parameter should be given as attribute of |
| 216 | +corresponding to the output of the network and the target. Other parameters should be given as attributes of |
224 | 217 | the callable object.</p>
|
225 | 218 | <dl class="field-list simple">
|
226 | 219 | <dt class="field-odd">Type<span class="colon">:</span></dt>
|
|
0 commit comments