Skip to content

Tensorflow doc changes on loss output size#9922

Merged
LysandreJik merged 3 commits into
huggingface:masterfrom
janjitse:tf-loss-doc-changes
Feb 1, 2021
Merged

Tensorflow doc changes on loss output size#9922
LysandreJik merged 3 commits into
huggingface:masterfrom
janjitse:tf-loss-doc-changes

Conversation

@janjitse
Copy link
Copy Markdown
Contributor

@janjitse janjitse commented Feb 1, 2021

What does this PR do?

Fixes #9771, by changing the documentation to correctly state the size of the output loss function.

I did not change the documentation for TFSeq2SeqQuestionAnsweringModelOutput and TFSeq2SeqSequenceClassifierOutput, as I could not find any code using this, so I was unsure what the correct output size would be.

I also fixed a few instances where I found the documentation referring to torch.LongTensor when tf.tensor should be used.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@jplu

@LysandreJik LysandreJik requested a review from jplu February 1, 2021 12:31
Copy link
Copy Markdown
Contributor

@jplu jplu left a comment

Choose a reason for hiding this comment

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

Thanks a lot for taking care of this!!

@LysandreJik LysandreJik merged commit d1b14c9 into huggingface:master Feb 1, 2021
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.

TF loss function output inconsistent with Pytorch one for multiple tasks

3 participants