fairseq/tests
Jun Ru Anderson 68c87f0abf optimize mixed precision (#1248)
Summary:
# Before submitting

- [ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- [x] Did you read the [contributor guideline](https://github.com/pytorch/fairseq/blob/master/CONTRIBUTING.md)?
- [x] Did you make sure to update the docs?
- [x] Did you write any new necessary tests?

## What does this PR do?
Implements the multiply_factor optimization used in memory efficient fp16 training to mixed precision training. The methods multiply_grads and clip_grad_norm do not touch each gradient, but rather a "multiply factor" that is then factored in when unscaling gradients.

## PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

## Did you have fun?
Make sure you had fun coding �

Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/1248

Reviewed By: myleott

Differential Revision: D23201396

Pulled By: andersonic

fbshipit-source-id: 6c6f64542893e0ecac72e132464bb334dcb9874d
2020-08-19 16:04:40 -07:00
..
gpu remediation of S205607 2020-07-17 17:21:51 -07:00
speech_recognition remediation of S205607 2020-07-17 17:21:51 -07:00
__init__.py remediation of S205607 2020-07-17 17:21:51 -07:00
test_average_checkpoints.py Small fixes 2019-08-19 15:08:25 -07:00
test_backtranslation_dataset.py Deprecate the SequenceGenerator with the Scripted vision (#1120) 2020-04-07 13:28:30 -07:00
test_binaries.py Multilingual v1: Multilingual Training with multiple bitext and monolingual datasets: new multiligual task 2020-07-16 09:34:29 -07:00
test_bmuf.py Fix BMUF using 1 GPU 2020-04-16 11:25:35 -07: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 Allow dictionaries to overwrite entries with #fairseq:overwrite comment (#1073) 2020-03-08 06:52:00 -07:00
test_export.py Bugfixes (#1159) 2020-05-01 04:09:37 -07: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_fp16_optimizer.py optimize mixed precision (#1248) 2020-08-19 16:04:40 -07:00
test_inference_dropout.py Implemented applying dropout at inference time (#2308) 2020-07-08 13:06:13 -07:00
test_iterators.py Update iterators to support counting, rename CountingIterator.count -> n and add tests (#1166) 2020-05-14 13:57:04 -07:00
test_label_smoothing.py refactor namespaces in criterion interface (#1729) 2020-03-04 16:43:59 -08:00
test_lstm_jitable.py Various fixes (#2127) 2020-05-14 10:23:34 -07:00
test_memory_efficient_fp16.py Clean up tests 2020-01-22 11:29:20 -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 Fix validation happening twice at the end of epoch (#1934) 2020-04-03 16:38:39 -07: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 Pass all net_inputs in SequenceGenerator (#2090) 2020-05-10 06:13:06 -07: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 Multilingual v1: Multilingual Training with multiple bitext and monolingual datasets: add finetuning options 2020-08-06 10:20:39 -07:00
test_utils.py Updates full to no longer use deprecated integer fill_value type inference 2020-06-22 11:56:58 -07:00
utils.py Misc fixes (#2448) 2020-08-14 10:24:51 -07:00