Implement _compute_intra_grad_corr_mean for gradient computation (#1095)
* Fix gradient accumulation Add ``is_scaled_loss`` flag to support both scaled / unscaled loss Fix ``test_grad_accum`` and``test_set_num_gradients_to_accumulate`` * Add a method to scale grad for grad_accum using unscaled loss - Revert the changes in `step` method - Add a method `scale_grad_by_num_grads_to_accum`to handle gradient accumulation using unscaled loss more explicitly - Add gradient tests * Implement _compute_corr_mean_between_grads * Improve tests and comments * Use ubuntu-20.04 instead of latest Use ubuntu-20.04 to fix the `arch x64 not found` issue [Version 3.10 with arch x64 not found actions/setup-python#401](https://github.com/actions/setup-python/issues/401) * Switch flake8 from gitlab to github Flake8 was moved to Github See discussions https://www.reddit.com/r/Python/comments/yvfww8/flake8_took_down_the_gitlab_repository_in_favor/ * Fix scikit-learn package * Update PyTorch v...
Showing
Please register or sign in to comment