Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix #92

Merged
merged 6 commits into from
Nov 1, 2017
Merged

bugfix #92

merged 6 commits into from
Nov 1, 2017

Conversation

taras-sereda
Copy link

No description provided.

kylegao91 and others added 2 commits October 30, 2017 11:54
* Modified parameter order of DecoderRNN.forward (IBM#85)

* Updated TopKDecoder (IBM#86)

* Fixed topk decoder.

* Use torchtext from pipy (IBM#87)

* Use torchtext from pipe.

* Fixed torch text sorting order.

* attention is not required when only using teacher forcing in decoder (IBM#90)

* attention is not required when only using teacher forcing in decoder

* Updated docs and version.

* Fixed code style.
@kylegao91 kylegao91 changed the base branch from master to develop October 31, 2017 14:36
@kylegao91
Copy link
Contributor

Thanks! Would you mind writing a small test case for it?

@taras-sereda
Copy link
Author

I'm not sure this fix requires new test case. There was a wrong if statement. And next statement:
kwargs['include_lengths'] = True would be executed anyway. It would be safer to set values inside if statements, and by doing this, already present testCase would cover this issue.

@taras-sereda
Copy link
Author

pushed new commit with safe assignment.

logger.warning("Option include_lengths has to be set to use pytorch-seq2seq. Changed to True.")
kwargs['include_lengths'] = True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kwargs['include_lengths'] has to be set and it has to be True. Your change doesn't make sure that it has a value, which leads to the test failure.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, you are right

Copy link
Contributor

@kylegao91 kylegao91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kylegao91 kylegao91 merged commit feabc36 into IBM:develop Nov 1, 2017
kylegao91 added a commit that referenced this pull request Dec 4, 2017
* 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.

* bugfix (#92)

Fixed field arguments validation.

* Removed `initial_lr` when resuming optimizer with scheduler. (#95)

* shuffle the training data (#97)

* 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.

* shuffle the training data

* fix example of inflate function in TopKDecoer.py (#98)

* fix example of inflate function in TopKDecoer.py

* Fix hidden_layer size for one-directional decoder (#99)

* Fix hidden_layer size for one-directional decoder

Hidden layer size of the decoder was given `hidden_size * 2 if bidirectional else 1`, resulting in a dimensionality error for non-bidirectional decoders.
Changed `1` to `hidden_size`.

* Adapt load to allow CPU loading of GPU models (#100)

* Adapt load to allow CPU loading of GPU models

Add storage parameter to torch.load to allow loading
models on a CPU that are trained on the GPU, depending
on availability of cuda.

* Fix wrong parameter use on DecoderRNN (#103)

* Fix wrong parameter use on DecoderRNN
kylegao91 added a commit that referenced this pull request May 4, 2018
* 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.

* bugfix (#92)

Fixed field arguments validation.

* Removed `initial_lr` when resuming optimizer with scheduler. (#95)

* shuffle the training data (#97)

* 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.

* shuffle the training data

* fix example of inflate function in TopKDecoer.py (#98)

* fix example of inflate function in TopKDecoer.py

* Fix hidden_layer size for one-directional decoder (#99)

* Fix hidden_layer size for one-directional decoder

Hidden layer size of the decoder was given `hidden_size * 2 if bidirectional else 1`, resulting in a dimensionality error for non-bidirectional decoders.
Changed `1` to `hidden_size`.

* Adapt load to allow CPU loading of GPU models (#100)

* Adapt load to allow CPU loading of GPU models

Add storage parameter to torch.load to allow loading
models on a CPU that are trained on the GPU, depending
on availability of cuda.

* Fix wrong parameter use on DecoderRNN (#103)

* Fix wrong parameter use on DecoderRNN

* Upgrade to pytorch-0.3.0 (#111)

* Upgrade to pytorch-0.3.0

* Use pytorch 3.0 in travis env.

* Make sure tensor contiguous when attention's not used. (#112)

* Implementing the predict_n method. Using the beam search outputs it returns several seqs for a given seq (#116)

* Adding a predictor method to return n predicted seqs for a src_seq input
(intended to be used along to Beam Search using TopKDecoder)

* Checkpoint after batches not epochs (#119)

* Pytorch 0.4 (#134)

* add contiguous call to tensor (#127)

when attention is turned off, pytorch (well, 0.4 at least) gets angry about calling view on a non-contiguous tensor

* Fixed shape documentation (#131)

* Update to pytorch-0.4

* Remove pytorch manual install in travis.

* Allow using pre-trained embedding (#135)

* updated docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants