fairseq/tests
Ning Dong 4e48c4ae5d Script MultiheadAttention (#1002)
Summary:
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1002

Pull Request resolved: https://github.com/pytorch/translate/pull/681

Pull Request resolved: https://github.com/pytorch/fairseq/pull/1524

Make fairseq MultiheadAttention scriptable. Looking for feedbacks.

1. Add types
2. Move incremental state management logic from util functions to initializers. TorchScript in general doesn't support global dict. As a result modules with multihead attention in it would assign itself fairseq_instance_id in the initializer.
3. There might be opportunities to make assertions and annotations cleaner.

Reviewed By: myleott

Differential Revision: D18772594

fbshipit-source-id: 377aef4bbb7ef51da5b6bac9a87a6f7b03b16fe1
2020-01-21 18:35:28 -08:00
..
speech_recognition Small fixes 2019-08-19 15:08:25 -07:00
__init__.py fairseq-py goes distributed (#106) 2018-02-27 17:09:42 -05:00
test_average_checkpoints.py Small fixes 2019-08-19 15:08:25 -07:00
test_backtranslation_dataset.py Add a diverse beam search variant to sequence_generator.py (#953) 2020-01-06 08:24:02 -08:00
test_binaries.py Add --eval-bleu for translation 2020-01-17 12:17:46 -08:00
test_bmuf.py Create build.yml 2019-12-17 20:45:11 -08:00
test_character_token_embedder.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_concat_dataset.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_convtbc.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_dictionary.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_export.py Script MultiheadAttention (#1002) 2020-01-21 18:35:28 -08:00
test_file_io.py Added unit test for PathManager file io (with or without fvcore). 2019-12-09 14:19:51 -08:00
test_iterators.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_label_smoothing.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_memory_efficient_fp16.py Create build.yml 2019-12-17 20:45:11 -08:00
test_metrics.py Fix logging of training sets (fixes #1632) (#1634) 2020-01-20 16:34:33 -08:00
test_multi_corpus_sampled_dataset.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_multihead_attention.py Fixing key padding mask during transformer generation 2019-11-05 06:50:53 -08:00
test_noising.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_reproducibility.py Script MultiheadAttention (#1002) 2020-01-21 18:35:28 -08:00
test_resampling_dataset.py Add dataset class for weighted sampling with replacement. (#861) 2019-09-19 10:36:00 -07:00
test_sequence_generator.py Add a diverse beam search variant to sequence_generator.py (#953) 2020-01-06 08:24:02 -08:00
test_sequence_scorer.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_sparse_multihead_attention.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_token_block_dataset.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_train.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
test_utils.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00
utils.py Relicense fairseq under MIT license (#786) 2019-07-30 07:48:23 -07:00