Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite8250fb

Browse files
authored
0.1.5 (#91)
* Modified parameter order of DecoderRNN.forward (#85)* Updated TopKDecoder (#86)* Fixed topk decoder.* Use torchtext from pipy (#87)* Use torchtext from pipe.* Fixed torch text sorting order.* attention is not required when only using teacher forcing in decoder (#90)* attention is not required when only using teacher forcing in decoder* Updated docs and version.* Fixed code style.
1 parentaa27eda commite8250fb

24 files changed

+383
-203
lines changed

‎docs/public/_modules/index.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<metaname="viewport"content="width=device-width, initial-scale=1.0">
1010

11-
<title>Overview: module code &mdash; pytorch-seq2seq 0.1.4 documentation</title>
11+
<title>Overview: module code &mdash; pytorch-seq2seq 0.1.5 documentation</title>
1212

1313

1414

@@ -35,7 +35,7 @@
3535
<linkrel="index"title="Index"
3636
href="../genindex.html"/>
3737
<linkrel="search"title="Search"href="../search.html"/>
38-
<linkrel="top"title="pytorch-seq2seq 0.1.4 documentation"href="../index.html"/>
38+
<linkrel="top"title="pytorch-seq2seq 0.1.5 documentation"href="../index.html"/>
3939

4040

4141
<scriptsrc="../_static/js/modernizr.min.js"></script>
@@ -64,7 +64,7 @@
6464

6565

6666
<divclass="version">
67-
0.1.4
67+
0.1.5
6868
</div>
6969

7070

@@ -215,7 +215,7 @@ <h1>All modules for which code is available</h1>
215215
<scripttype="text/javascript">
216216
varDOCUMENTATION_OPTIONS={
217217
URL_ROOT:'../',
218-
VERSION:'0.1.4',
218+
VERSION:'0.1.5',
219219
COLLAPSE_INDEX:false,
220220
FILE_SUFFIX:'.html',
221221
HAS_SOURCE:true,

‎docs/public/dataset.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<metaname="viewport"content="width=device-width, initial-scale=1.0">
1010

11-
<title>Dataset &mdash; pytorch-seq2seq 0.1.4 documentation</title>
11+
<title>Dataset &mdash; pytorch-seq2seq 0.1.5 documentation</title>
1212

1313

1414

@@ -35,7 +35,7 @@
3535
<linkrel="index"title="Index"
3636
href="genindex.html"/>
3737
<linkrel="search"title="Search"href="search.html"/>
38-
<linkrel="top"title="pytorch-seq2seq 0.1.4 documentation"href="index.html"/>
38+
<linkrel="top"title="pytorch-seq2seq 0.1.5 documentation"href="index.html"/>
3939
<linkrel="next"title="Util"href="util.html"/>
4040
<linkrel="prev"title="Introduction"href="notes/intro.html"/>
4141

@@ -66,7 +66,7 @@
6666

6767

6868
<divclass="version">
69-
0.1.4
69+
0.1.5
7070
</div>
7171

7272

@@ -260,7 +260,7 @@ <h1>Dataset<a class="headerlink" href="#dataset" title="Permalink to this headli
260260
<scripttype="text/javascript">
261261
varDOCUMENTATION_OPTIONS={
262262
URL_ROOT:'./',
263-
VERSION:'0.1.4',
263+
VERSION:'0.1.5',
264264
COLLAPSE_INDEX:false,
265265
FILE_SUFFIX:'.html',
266266
HAS_SOURCE:true,

‎docs/public/evaluator.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<metaname="viewport"content="width=device-width, initial-scale=1.0">
1010

11-
<title>Evaluator &mdash; pytorch-seq2seq 0.1.4 documentation</title>
11+
<title>Evaluator &mdash; pytorch-seq2seq 0.1.5 documentation</title>
1212

1313

1414

@@ -35,7 +35,7 @@
3535
<linkrel="index"title="Index"
3636
href="genindex.html"/>
3737
<linkrel="search"title="Search"href="search.html"/>
38-
<linkrel="top"title="pytorch-seq2seq 0.1.4 documentation"href="index.html"/>
38+
<linkrel="top"title="pytorch-seq2seq 0.1.5 documentation"href="index.html"/>
3939
<linkrel="next"title="Loss"href="loss.html"/>
4040
<linkrel="prev"title="Util"href="util.html"/>
4141

@@ -66,7 +66,7 @@
6666

6767

6868
<divclass="version">
69-
0.1.4
69+
0.1.5
7070
</div>
7171

7272

@@ -290,7 +290,7 @@ <h2>evaluator<a class="headerlink" href="#id1" title="Permalink to this headline
290290
<scripttype="text/javascript">
291291
varDOCUMENTATION_OPTIONS={
292292
URL_ROOT:'./',
293-
VERSION:'0.1.4',
293+
VERSION:'0.1.5',
294294
COLLAPSE_INDEX:false,
295295
FILE_SUFFIX:'.html',
296296
HAS_SOURCE:true,

‎docs/public/genindex.html‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<metaname="viewport"content="width=device-width, initial-scale=1.0">
1111

12-
<title>Index &mdash; pytorch-seq2seq 0.1.4 documentation</title>
12+
<title>Index &mdash; pytorch-seq2seq 0.1.5 documentation</title>
1313

1414

1515

@@ -36,7 +36,7 @@
3636
<linkrel="index"title="Index"
3737
href="#"/>
3838
<linkrel="search"title="Search"href="search.html"/>
39-
<linkrel="top"title="pytorch-seq2seq 0.1.4 documentation"href="index.html"/>
39+
<linkrel="top"title="pytorch-seq2seq 0.1.5 documentation"href="index.html"/>
4040

4141

4242
<scriptsrc="_static/js/modernizr.min.js"></script>
@@ -65,7 +65,7 @@
6565

6666

6767
<divclass="version">
68-
0.1.4
68+
0.1.5
6969
</div>
7070

7171

@@ -246,11 +246,11 @@ <h2 id="F">F</h2>
246246
<tablestyle="width: 100%"class="indextable genindextable"><tr>
247247
<tdstyle="width: 33%; vertical-align: top;"><ul>
248248
<li><ahref="models.html#seq2seq.models.EncoderRNN.EncoderRNN.forward">forward() (seq2seq.models.EncoderRNN.EncoderRNN method)</a>
249+
250+
<ul>
251+
<li><ahref="models.html#seq2seq.models.TopKDecoder.TopKDecoder.forward">(seq2seq.models.TopKDecoder.TopKDecoder method)</a>
249252
</li>
250-
</ul></td>
251-
<tdstyle="width: 33%; vertical-align: top;"><ul>
252-
<li><ahref="models.html#seq2seq.models.TopKDecoder.TopKDecoder.forward_rnn">forward_rnn() (seq2seq.models.TopKDecoder.TopKDecoder method)</a>
253-
</li>
253+
</ul></li>
254254
</ul></td>
255255
</tr></table>
256256

@@ -450,7 +450,7 @@ <h2 id="U">U</h2>
450450
<scripttype="text/javascript">
451451
varDOCUMENTATION_OPTIONS={
452452
URL_ROOT:'./',
453-
VERSION:'0.1.4',
453+
VERSION:'0.1.5',
454454
COLLAPSE_INDEX:false,
455455
FILE_SUFFIX:'.html',
456456
HAS_SOURCE:true,

‎docs/public/index.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<metaname="viewport"content="width=device-width, initial-scale=1.0">
1010

11-
<title>PyTorch-Seq2seq: A sequence-to-sequence framework for PyTorch &mdash; pytorch-seq2seq 0.1.4 documentation</title>
11+
<title>PyTorch-Seq2seq: A sequence-to-sequence framework for PyTorch &mdash; pytorch-seq2seq 0.1.5 documentation</title>
1212

1313

1414

@@ -35,7 +35,7 @@
3535
<linkrel="index"title="Index"
3636
href="genindex.html"/>
3737
<linkrel="search"title="Search"href="search.html"/>
38-
<linkrel="top"title="pytorch-seq2seq 0.1.4 documentation"href="#"/>
38+
<linkrel="top"title="pytorch-seq2seq 0.1.5 documentation"href="#"/>
3939
<linkrel="next"title="Introduction"href="notes/intro.html"/>
4040

4141

@@ -65,7 +65,7 @@
6565

6666

6767
<divclass="version">
68-
0.1.4
68+
0.1.5
6969
</div>
7070

7171

@@ -229,7 +229,7 @@ <h1>PyTorch-Seq2seq: A sequence-to-sequence framework for PyTorch<a class="heade
229229
<scripttype="text/javascript">
230230
varDOCUMENTATION_OPTIONS={
231231
URL_ROOT:'./',
232-
VERSION:'0.1.4',
232+
VERSION:'0.1.5',
233233
COLLAPSE_INDEX:false,
234234
FILE_SUFFIX:'.html',
235235
HAS_SOURCE:true,

‎docs/public/loss.html‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<metaname="viewport"content="width=device-width, initial-scale=1.0">
1010

11-
<title>Loss &mdash; pytorch-seq2seq 0.1.4 documentation</title>
11+
<title>Loss &mdash; pytorch-seq2seq 0.1.5 documentation</title>
1212

1313

1414

@@ -35,7 +35,7 @@
3535
<linkrel="index"title="Index"
3636
href="genindex.html"/>
3737
<linkrel="search"title="Search"href="search.html"/>
38-
<linkrel="top"title="pytorch-seq2seq 0.1.4 documentation"href="index.html"/>
38+
<linkrel="top"title="pytorch-seq2seq 0.1.5 documentation"href="index.html"/>
3939
<linkrel="next"title="Optim"href="optim.html"/>
4040
<linkrel="prev"title="Evaluator"href="evaluator.html"/>
4141

@@ -66,7 +66,7 @@
6666

6767

6868
<divclass="version">
69-
0.1.4
69+
0.1.5
7070
</div>
7171

7272

@@ -226,8 +226,8 @@ <h2>Loss<a class="headerlink" href="#id1" title="Permalink to this headline">¶<
226226
<colclass="field-body"/>
227227
<tbodyvalign="top">
228228
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
229-
<li><strong>outputs</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+c580352 ))"><em>torch.Tensor</em></a>) – outputs of a batch.</li>
230-
<li><strong>target</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+c580352 ))"><em>torch.Tensor</em></a>) – expected output of a batch.</li>
229+
<li><strong>outputs</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+2e42272 ))"><em>torch.Tensor</em></a>) – outputs of a batch.</li>
230+
<li><strong>target</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+2e42272 ))"><em>torch.Tensor</em></a>) – expected output of a batch.</li>
231231
</ul>
232232
</td>
233233
</tr>
@@ -274,7 +274,7 @@ <h2>NLLLoss<a class="headerlink" href="#nllloss" title="Permalink to this headli
274274
<colclass="field-body"/>
275275
<tbodyvalign="top">
276276
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
277-
<li><strong>weight</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+c580352 ))"><em>torch.Tensor</em></a><em>,</em><em>optional</em>) – refer to<aclass="reference external"href="http://pytorch.org/docs/master/nn.html#nllloss">http://pytorch.org/docs/master/nn.html#nllloss</a></li>
277+
<li><strong>weight</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+2e42272 ))"><em>torch.Tensor</em></a><em>,</em><em>optional</em>) – refer to<aclass="reference external"href="http://pytorch.org/docs/master/nn.html#nllloss">http://pytorch.org/docs/master/nn.html#nllloss</a></li>
278278
<li><strong>mask</strong> (<aclass="reference external"href="https://docs.python.org/2/library/functions.html#int"title="(in Python v2.7)"><em>int</em></a><em>,</em><em>optional</em>) – index of masked token, i.e. weight[mask] = 0.</li>
279279
<li><strong>size_average</strong> (<aclass="reference external"href="https://docs.python.org/2/library/functions.html#bool"title="(in Python v2.7)"><em>bool</em></a><em>,</em><em>optional</em>) – refer to<aclass="reference external"href="http://pytorch.org/docs/master/nn.html#nllloss">http://pytorch.org/docs/master/nn.html#nllloss</a></li>
280280
</ul>
@@ -298,7 +298,7 @@ <h2>Perplexity<a class="headerlink" href="#perplexity" title="Permalink to this
298298
<colclass="field-body"/>
299299
<tbodyvalign="top">
300300
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
301-
<li><strong>weight</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+c580352 ))"><em>torch.Tensor</em></a><em>,</em><em>optional</em>) – refer to<aclass="reference external"href="http://pytorch.org/docs/master/nn.html#nllloss">http://pytorch.org/docs/master/nn.html#nllloss</a></li>
301+
<li><strong>weight</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+2e42272 ))"><em>torch.Tensor</em></a><em>,</em><em>optional</em>) – refer to<aclass="reference external"href="http://pytorch.org/docs/master/nn.html#nllloss">http://pytorch.org/docs/master/nn.html#nllloss</a></li>
302302
<li><strong>mask</strong> (<aclass="reference external"href="https://docs.python.org/2/library/functions.html#int"title="(in Python v2.7)"><em>int</em></a><em>,</em><em>optional</em>) – index of masked token, i.e. weight[mask] = 0.</li>
303303
</ul>
304304
</td>
@@ -354,7 +354,7 @@ <h2>Perplexity<a class="headerlink" href="#perplexity" title="Permalink to this
354354
<scripttype="text/javascript">
355355
varDOCUMENTATION_OPTIONS={
356356
URL_ROOT:'./',
357-
VERSION:'0.1.4',
357+
VERSION:'0.1.5',
358358
COLLAPSE_INDEX:false,
359359
FILE_SUFFIX:'.html',
360360
HAS_SOURCE:true,

‎docs/public/models.html‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<metaname="viewport"content="width=device-width, initial-scale=1.0">
1010

11-
<title>Models &mdash; pytorch-seq2seq 0.1.4 documentation</title>
11+
<title>Models &mdash; pytorch-seq2seq 0.1.5 documentation</title>
1212

1313

1414

@@ -35,7 +35,7 @@
3535
<linkrel="index"title="Index"
3636
href="genindex.html"/>
3737
<linkrel="search"title="Search"href="search.html"/>
38-
<linkrel="top"title="pytorch-seq2seq 0.1.4 documentation"href="index.html"/>
38+
<linkrel="top"title="pytorch-seq2seq 0.1.5 documentation"href="index.html"/>
3939
<linkrel="prev"title="Trainer"href="trainer.html"/>
4040

4141

@@ -65,7 +65,7 @@
6565

6666

6767
<divclass="version">
68-
0.1.4
68+
0.1.5
6969
</div>
7070

7171

@@ -407,14 +407,16 @@ <h1>Models<a class="headerlink" href="#models" title="Permalink to this headline
407407
<li><strong>decoder_hidden</strong> (num_layers * num_directions, batch, hidden_size): tensor containing the last hidden
408408
state of the decoder.</li>
409409
<li><strong>ret_dict</strong>: dictionary containing additional information as follows {<em>length</em> : list of integers
410-
representing lengths of output sequences,<em>sequence</em> : list of sequences, where each sequence is a list of
411-
predicted token IDs,<em>inputs</em> : target outputs if provided for decoding}.</li>
410+
representing lengths of output sequences,<em>topk_length</em>: list of integers representing lengths of beam search
411+
sequences,<em>sequence</em> : list of sequences, where each sequence is a list of predicted token IDs,
412+
<em>topk_sequence</em> : list of beam search sequences, each beam is a list of token IDs,<em>inputs</em> : target
413+
outputs if provided for decoding}.</li>
412414
</ul>
413415
</dd>
414416
</dl>
415417
<dlclass="method">
416-
<dtid="seq2seq.models.TopKDecoder.TopKDecoder.forward_rnn">
417-
<codeclass="descname">forward_rnn</code><spanclass="sig-paren">(</span><em>inputs=None</em>,<em>encoder_hidden=None</em>,<em>encoder_outputs=None</em>,<em>function=&lt;function log_softmax&gt;</em>,<em>retain_output_probs=True</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#seq2seq.models.TopKDecoder.TopKDecoder.forward_rnn"title="Permalink to this definition"></a></dt>
418+
<dtid="seq2seq.models.TopKDecoder.TopKDecoder.forward">
419+
<codeclass="descname">forward</code><spanclass="sig-paren">(</span><em>inputs=None</em>,<em>encoder_hidden=None</em>,<em>encoder_outputs=None</em>,<em>function=&lt;function log_softmax&gt;</em>,<em>teacher_forcing_ratio=0</em>,<em>retain_output_probs=True</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#seq2seq.models.TopKDecoder.TopKDecoder.forward"title="Permalink to this definition"></a></dt>
418420
<dd><p>Forward rnn for MAX_LENGTH steps. Look at<codeclass="xref py py-func docutils literal"><spanclass="pre">seq2seq.models.DecoderRNN.DecoderRNN.forward_rnn()</span></code> for details.</p>
419421
</dd></dl>
420422

@@ -460,8 +462,8 @@ <h1>Models<a class="headerlink" href="#models" title="Permalink to this headline
460462
<colclass="field-body"/>
461463
<tbodyvalign="top">
462464
<trclass="field-odd field"><thclass="field-name">Variables:</th><tdclass="field-body"><ulclass="first last simple">
463-
<li><strong>linear_out</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/nn.html#torch.nn.Linear"title="(in PyTorch vmaster (0.2.0+c580352 ))"><em>torch.nn.Linear</em></a>) – applies a linear transformation to the incoming data:<spanclass="math">\(y = Ax + b\)</span>.</li>
464-
<li><strong>mask</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+c580352 ))"><em>torch.Tensor</em></a><em>,</em><em>optional</em>) – applies a<spanclass="math">\(-inf\)</span> to the indices specified in the<cite>Tensor</cite>.</li>
465+
<li><strong>linear_out</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/nn.html#torch.nn.Linear"title="(in PyTorch vmaster (0.2.0+2e42272 ))"><em>torch.nn.Linear</em></a>) – applies a linear transformation to the incoming data:<spanclass="math">\(y = Ax + b\)</span>.</li>
466+
<li><strong>mask</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+2e42272 ))"><em>torch.Tensor</em></a><em>,</em><em>optional</em>) – applies a<spanclass="math">\(-inf\)</span> to the indices specified in the<cite>Tensor</cite>.</li>
465467
</ul>
466468
</td>
467469
</tr>
@@ -482,7 +484,7 @@ <h1>Models<a class="headerlink" href="#models" title="Permalink to this headline
482484
<colclass="field-name"/>
483485
<colclass="field-body"/>
484486
<tbodyvalign="top">
485-
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>mask</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+c580352 ))"><em>torch.Tensor</em></a>) – tensor containing indices to be masked</td>
487+
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>mask</strong> (<aclass="reference external"href="http://pytorch.org/docs/master/tensors.html#torch.Tensor"title="(in PyTorch vmaster (0.2.0+2e42272 ))"><em>torch.Tensor</em></a>) – tensor containing indices to be masked</td>
486488
</tr>
487489
</tbody>
488490
</table>
@@ -588,7 +590,7 @@ <h1>Models<a class="headerlink" href="#models" title="Permalink to this headline
588590
<scripttype="text/javascript">
589591
varDOCUMENTATION_OPTIONS={
590592
URL_ROOT:'./',
591-
VERSION:'0.1.4',
593+
VERSION:'0.1.5',
592594
COLLAPSE_INDEX:false,
593595
FILE_SUFFIX:'.html',
594596
HAS_SOURCE:true,

‎docs/public/notes/intro.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<metaname="viewport"content="width=device-width, initial-scale=1.0">
1010

11-
<title>Introduction &mdash; pytorch-seq2seq 0.1.4 documentation</title>
11+
<title>Introduction &mdash; pytorch-seq2seq 0.1.5 documentation</title>
1212

1313

1414

@@ -35,7 +35,7 @@
3535
<linkrel="index"title="Index"
3636
href="../genindex.html"/>
3737
<linkrel="search"title="Search"href="../search.html"/>
38-
<linkrel="top"title="pytorch-seq2seq 0.1.4 documentation"href="../index.html"/>
38+
<linkrel="top"title="pytorch-seq2seq 0.1.5 documentation"href="../index.html"/>
3939
<linkrel="next"title="Dataset"href="../dataset.html"/>
4040
<linkrel="prev"title="PyTorch-Seq2seq: A sequence-to-sequence framework for PyTorch"href="../index.html"/>
4141

@@ -66,7 +66,7 @@
6666

6767

6868
<divclass="version">
69-
0.1.4
69+
0.1.5
7070
</div>
7171

7272

@@ -317,7 +317,7 @@
317317
<scripttype="text/javascript">
318318
varDOCUMENTATION_OPTIONS={
319319
URL_ROOT:'../',
320-
VERSION:'0.1.4',
320+
VERSION:'0.1.5',
321321
COLLAPSE_INDEX:false,
322322
FILE_SUFFIX:'.html',
323323
HAS_SOURCE:true,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp