Skip to content

Commit 87a6cb5

Browse files
committed
Updated doc
1 parent c9af1a7 commit 87a6cb5

File tree

6 files changed

+57
-11
lines changed

6 files changed

+57
-11
lines changed

doc/build/doctrees/code.doctree

13 KB
Binary file not shown.

doc/build/doctrees/environment.pickle

314 Bytes
Binary file not shown.

doc/build/html/code.html

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
174174
<tbody valign="top">
175175
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
176176
<li><strong>set_name</strong> &#8211; &#8216;train&#8217;, &#8216;val&#8217; or &#8216;test&#8217; set</li>
177-
<li><strong>init</strong> &#8211; initial position in the corresponding set split. Must be bigger or equal than 0 and bigger than final.</li>
177+
<li><strong>init</strong> &#8211; initial position in the corresponding set split. Must be bigger or equal than 0 and smaller than final.</li>
178178
<li><strong>final</strong> &#8211; final position in the corresponding set split.</li>
179179
<li><strong>debug</strong> &#8211; if True all data will be returned without preprocessing</li>
180180
</ul>
@@ -280,7 +280,7 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
280280

281281
<dl class="method">
282282
<dt id="keras_wrapper.dataset.Dataset.loadText">
283-
<code class="descname">loadText</code><span class="sig-paren">(</span><em>X</em>, <em>vocabularies</em>, <em>max_len</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.dataset.Dataset.loadText" title="Permalink to this definition"></a></dt>
283+
<code class="descname">loadText</code><span class="sig-paren">(</span><em>X</em>, <em>vocabularies</em>, <em>max_len</em>, <em>offset</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.dataset.Dataset.loadText" title="Permalink to this definition"></a></dt>
284284
<dd><p>Text encoder. Transforms samples from a text representation into a numerical one.</p>
285285
</dd></dl>
286286

@@ -299,7 +299,7 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
299299

300300
<dl class="method">
301301
<dt id="keras_wrapper.dataset.Dataset.setInput">
302-
<code class="descname">setInput</code><span class="sig-paren">(</span><em>path_list, set_name, type='image', id='image', repeat_set=1, img_size=[256, 256, 3], img_size_crop=[227, 227, 3], max_text_len=35, tokenization='tokenize_basic', build_vocabulary=False, max_words=0, feat_len=1024, max_video_len=26</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.dataset.Dataset.setInput" title="Permalink to this definition"></a></dt>
302+
<code class="descname">setInput</code><span class="sig-paren">(</span><em>path_list, set_name, type='image', id='image', repeat_set=1, required=True, img_size=[256, 256, 3], img_size_crop=[227, 227, 3], max_text_len=35, tokenization='tokenize_basic', offset=0, build_vocabulary=False, max_words=0, feat_len=1024, max_video_len=26</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.dataset.Dataset.setInput" title="Permalink to this definition"></a></dt>
303303
<dd><p>Loads a list of samples which can contain all samples from the &#8216;train&#8217;, &#8216;val&#8217;, or
304304
&#8216;test&#8217; sets (specified by set_name).</p>
305305
<p># General parameters</p>
@@ -308,11 +308,12 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
308308
<col class="field-body" />
309309
<tbody valign="top">
310310
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
311-
<li><strong>path_list</strong> &#8211; can either be a path to a .txt file containing the paths to the images or a python list of paths</li>
311+
<li><strong>path_list</strong> &#8211; can either be a path to a text file containing the paths to the images or a python list of paths</li>
312312
<li><strong>set_name</strong> &#8211; identifier of the set split loaded (&#8216;train&#8217;, &#8216;val&#8217; or &#8216;test&#8217;)</li>
313313
<li><strong>type</strong> &#8211; identifier of the type of input we are loading (accepted types can be seen in self.__accepted_types_inputs)</li>
314314
<li><strong>id</strong> &#8211; identifier of the input data loaded</li>
315315
<li><strong>repeat_set</strong> &#8211; repats the inputs given (useful when we have more outputs than inputs). Int or array of ints.</li>
316+
<li><strong>required</strong> &#8211; flag for optional inputs</li>
316317
</ul>
317318
</td>
318319
</tr>
@@ -341,6 +342,7 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
341342
<li><strong>build_vocabulary</strong> &#8211; whether a new vocabulary will be built from the loaded data or not (only applicable when type==&#8217;text&#8217;).</li>
342343
<li><strong>max_text_len</strong> &#8211; maximum text length, the rest of the data will be padded with 0s (only applicable if the output data is of type &#8216;text&#8217;).</li>
343344
<li><strong>max_words</strong> &#8211; a maximum of &#8216;max_words&#8217; words from the whole vocabulary will be chosen by number or occurrences</li>
345+
<li><strong>offset</strong> &#8211; Number of timesteps that the text is shifted to the right (for <a href="#id1"><span class="problematic" id="id2">*</span></a>_cond models)</li>
344346
</ul>
345347
</td>
346348
</tr>
@@ -376,7 +378,7 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
376378
<col class="field-body" />
377379
<tbody valign="top">
378380
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
379-
<li><strong>path_list</strong> &#8211; path to the .txt file with the list of images.</li>
381+
<li><strong>path_list</strong> &#8211; path to the text file with the list of images.</li>
380382
<li><strong>split</strong> &#8211; percentage of images used for [training, validation, test].</li>
381383
<li><strong>shuffle</strong> &#8211; whether we are randomly shuffling the input samples or not.</li>
382384
<li><strong>type</strong> &#8211; identifier of the type of input we are loading (accepted types can be seen in self.__accepted_types_inputs)</li>
@@ -408,19 +410,19 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
408410

409411
<dl class="method">
410412
<dt id="keras_wrapper.dataset.Dataset.setOutput">
411-
<code class="descname">setOutput</code><span class="sig-paren">(</span><em>path_list</em>, <em>set_name</em>, <em>type='categorical'</em>, <em>id='label'</em>, <em>repeat_set=1</em>, <em>tokenization='tokenize_basic'</em>, <em>max_text_len=0</em>, <em>build_vocabulary=False</em>, <em>max_words=0</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.dataset.Dataset.setOutput" title="Permalink to this definition"></a></dt>
413+
<code class="descname">setOutput</code><span class="sig-paren">(</span><em>path_list</em>, <em>set_name</em>, <em>type='categorical'</em>, <em>id='label'</em>, <em>repeat_set=1</em>, <em>tokenization='tokenize_basic'</em>, <em>max_text_len=0</em>, <em>offset=0</em>, <em>build_vocabulary=False</em>, <em>max_words=0</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.dataset.Dataset.setOutput" title="Permalink to this definition"></a></dt>
412414
<dd><p>Loads a set of output data, usually (type==&#8217;categorical&#8217;) referencing values in self.classes (starting from 0)</p>
413415
<p># General parameters</p>
414416
<table class="docutils field-list" frame="void" rules="none">
415417
<col class="field-name" />
416418
<col class="field-body" />
417419
<tbody valign="top">
418420
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
419-
<li><strong>path_list</strong> &#8211; can either be a path to a .txt file containing the labels or a python list of labels.</li>
421+
<li><strong>path_list</strong> &#8211; can either be a path to a text file containing the labels or a python list of labels.</li>
420422
<li><strong>set_name</strong> &#8211; identifier of the set split loaded (&#8216;train&#8217;, &#8216;val&#8217; or &#8216;test&#8217;).</li>
421423
<li><strong>type</strong> &#8211; identifier of the type of input we are loading (accepted types can be seen in self.__accepted_types_outputs).</li>
422424
<li><strong>id</strong> &#8211; identifier of the input data loaded.</li>
423-
<li><strong>repeat_set</strong> &#8211; repats the outputs given (useful when we have more inputs than outputs). Int or array of ints.</li>
425+
<li><strong>repeat_set</strong> &#8211; repeats the outputs given (useful when we have more inputs than outputs). Int or array of ints.</li>
424426
</ul>
425427
</td>
426428
</tr>
@@ -476,7 +478,17 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
476478

477479
<dl class="method">
478480
<dt id="keras_wrapper.dataset.Dataset.tokenize_basic">
479-
<code class="descname">tokenize_basic</code><span class="sig-paren">(</span><em>caption</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.dataset.Dataset.tokenize_basic" title="Permalink to this definition"></a></dt>
481+
<code class="descname">tokenize_basic</code><span class="sig-paren">(</span><em>caption</em>, <em>lowercase=True</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.dataset.Dataset.tokenize_basic" title="Permalink to this definition"></a></dt>
482+
<dd><dl class="docutils">
483+
<dt>Basic tokenizer for the input/output data of type &#8216;text&#8217;:</dt>
484+
<dd>Splits punctuation
485+
Lowercase</dd>
486+
</dl>
487+
</dd></dl>
488+
489+
<dl class="method">
490+
<dt id="keras_wrapper.dataset.Dataset.tokenize_questions">
491+
<code class="descname">tokenize_questions</code><span class="sig-paren">(</span><em>caption</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.dataset.Dataset.tokenize_questions" title="Permalink to this definition"></a></dt>
480492
<dd><p>Basic tokenizer for the input/output data of type &#8216;text&#8217;</p>
481493
</dd></dl>
482494

@@ -635,6 +647,31 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
635647
<dd><p>Plots the training progress information.</p>
636648
</dd></dl>
637649

650+
<dl class="method">
651+
<dt id="keras_wrapper.cnn_model.CNN_Model.predictNet">
652+
<code class="descname">predictNet</code><span class="sig-paren">(</span><em>ds</em>, <em>parameters</em>, <em>out_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.cnn_model.CNN_Model.predictNet" title="Permalink to this definition"></a></dt>
653+
<dd><p>Returns the predictions of the net on the dataset splits chosen. The valid parameters are:</p>
654+
<table class="docutils field-list" frame="void" rules="none">
655+
<col class="field-name" />
656+
<col class="field-body" />
657+
<tbody valign="top">
658+
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
659+
<li><strong>batch_size</strong> &#8211; size of the batch</li>
660+
<li><strong>n_parallel_loaders</strong> &#8211; number of parallel data batch loaders</li>
661+
<li><strong>normalize_images</strong> &#8211; apply data normalization on images/features or not (only if using images/features as input)</li>
662+
<li><strong>mean_substraction</strong> &#8211; apply mean data normalization on images or not (only if using images as input)</li>
663+
<li><strong>predict_on_sets</strong> &#8211; list of set splits for which we want to extract the predictions [&#8216;train&#8217;, &#8216;val&#8217;, &#8216;test&#8217;]</li>
664+
</ul>
665+
</td>
666+
</tr>
667+
<tr class="field-even field"><th class="field-name" colspan="2">Returns predictions:</th></tr>
668+
<tr class="field-even field"><td>&nbsp;</td><td class="field-body"><p class="first last">dictionary with set splits as keys and matrices of predictions as values.</p>
669+
</td>
670+
</tr>
671+
</tbody>
672+
</table>
673+
</dd></dl>
674+
638675
<dl class="method">
639676
<dt id="keras_wrapper.cnn_model.CNN_Model.predictOnBatch">
640677
<code class="descname">predictOnBatch</code><span class="sig-paren">(</span><em>X</em>, <em>in_name=None</em>, <em>out_name=None</em>, <em>expand=False</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.cnn_model.CNN_Model.predictOnBatch" title="Permalink to this definition"></a></dt>
@@ -672,7 +709,8 @@ <h1>Documentation for the Code<a class="headerlink" href="#documentation-for-the
672709
<dl class="method">
673710
<dt id="keras_wrapper.cnn_model.CNN_Model.resumeTrainNet">
674711
<code class="descname">resumeTrainNet</code><span class="sig-paren">(</span><em>ds</em>, <em>parameters</em>, <em>out_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#keras_wrapper.cnn_model.CNN_Model.resumeTrainNet" title="Permalink to this definition"></a></dt>
675-
<dd><p>Resumes the last training state of a stored model keeping also its training parameters.
712+
<dd><p>DEPRECATED</p>
713+
<p>Resumes the last training state of a stored model keeping also its training parameters.
676714
If we introduce any parameter through the argument &#8216;parameters&#8217;, it will be replaced by the old one.</p>
677715
<table class="docutils field-list" frame="void" rules="none">
678716
<col class="field-name" />

doc/build/html/genindex.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,10 @@ <h2 id="P">P</h2>
454454
</dt>
455455

456456

457+
<dt><a href="code.html#keras_wrapper.cnn_model.CNN_Model.predictNet">predictNet() (keras_wrapper.cnn_model.CNN_Model method)</a>
458+
</dt>
459+
460+
457461
<dt><a href="code.html#keras_wrapper.cnn_model.CNN_Model.predictOnBatch">predictOnBatch() (keras_wrapper.cnn_model.CNN_Model method)</a>
458462
</dt>
459463

@@ -692,6 +696,10 @@ <h2 id="T">T</h2>
692696
</dt>
693697

694698

699+
<dt><a href="code.html#keras_wrapper.dataset.Dataset.tokenize_questions">tokenize_questions() (keras_wrapper.dataset.Dataset method)</a>
700+
</dt>
701+
702+
695703
<dt><a href="code.html#keras_wrapper.cnn_model.CNN_Model.trainNet">trainNet() (keras_wrapper.cnn_model.CNN_Model method)</a>
696704
</dt>
697705

doc/build/html/objects.inv

10 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)