Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix static shape check in crd_decode #2753

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vankov
Copy link

@vankov vankov commented Aug 26, 2022

When checking whether the shape of 'potentials' is static in crf_decode, you need to check whether potentials.shape[1].value is None, and not potentials.shape[1] (which is a Dimension object and is never equal to None).

Description

Brief Description of the PR:

Fixes # (issue)

Type of change

Checklist:

  • I've properly formatted my code according to the guidelines
    • By running Black + Flake8
    • By running pre-commit hooks
  • This PR addresses an already submitted issue for TensorFlow Addons
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • This PR contains modifications to C++ custom-ops

How Has This Been Tested?

If you're adding a bugfix or new feature please describe the tests that you ran to verify your changes:

I've checked the resulting graphs using both static and dynamic shapes with and feeding either single item or multiple item sequences.

When checking whether the shape of 'potentials' is static in crf_decode, you need to check whether potentials.shape[1].value is None, and not potentials.shape[1] (which is a Dimension object and is never equal to None).
@boring-cyborg boring-cyborg bot added the text label Aug 26, 2022
@google-cla
Copy link

google-cla bot commented Aug 26, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@bot-of-gabrieldemarmiesse

@howl-anderson

You are owner of some files modified in this pull request.
Would you kindly review the changes whenever you have the time to?
Thank you very much.

@bhack
Copy link
Contributor

bhack commented Aug 26, 2022

Do you have a test extension to cover/check your case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants