Skip to content

Conversation

@mhavasi
Copy link
Contributor

@mhavasi mhavasi commented Feb 25, 2022

tf.stack only accounted for the last batch of gradients, instead of collecting the gradients from all batches. All but the last batch were discarded. The correct implementation is to concatenate the gradient batches by the first axis. This way, all the gradients are correctly accounted for.

Tested the changes by running the notebook in googe colab.

tf.stack only accounted for the last batch of gradients, instead of collecting the gradients from all batches. The all but the last batch were discarded. The correct implementation is to concatenate the gradient batches by the first axis. This way, all the gradients are correctly accounted for.

Tested the changes by running it in googe colab.
@github-actions
Copy link

Preview

Preview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.

Format and style

Use the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:
$ python3 -m pip install -U --user git+https://github.com/tensorflow/docs

$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
If commits are added to the pull request, synchronize your local branch: git pull origin patch-1

Copy link
Member

@MarkDaoust MarkDaoust left a comment

Choose a reason for hiding this comment

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

Oops, that was my mistake. Thanks!

@github-actions github-actions bot added the lgtm Community-added approval label Feb 25, 2022
@8bitmp3 8bitmp3 added the ready to pull Start merge process label Feb 25, 2022
@copybara-service copybara-service bot merged commit 456cfba into tensorflow:master Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Community-added approval ready to pull Start merge process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants