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

assert_shapes broken code in documentation #33974

Closed
bodin-e opened this issue Nov 4, 2019 · 4 comments
Assignees

Comments

@bodin-e
Copy link
Contributor

@bodin-e bodin-e commented Nov 4, 2019

URL(s) with the issue:

https://www.tensorflow.org/api_docs/python/tf/debugging/assert_shapes

Description of issue (what needs changing):

The source code in the example is incorrect.

Is:
tf.assert_shapes([
(x: ('N', 'Q')),
(y: ('N', 'D')),
(param: ('Q',)),
(scalar: ()),
])

Should be:
tf.assert_shapes([
(x, ('N', 'Q')),
(y, ('N', 'D')),
(param, ('Q',)),
(scalar, ()),
]).

Note that ":" is not allowed in Python to form 2-tuples.

@lamberta

This comment has been minimized.

Copy link
Member

@lamberta lamberta commented Nov 6, 2019

Thanks for the report! Can you make a PR? That file is here: https://github.com/tensorflow/tensorflow/blob/r2.0/tensorflow/python/ops/check_ops.py#L1697-L1747 (link at top of page on tf.org)

dubesar added a commit to dubesar/tensorflow that referenced this issue Nov 7, 2019
@dubesar

This comment has been minimized.

Copy link
Contributor

@dubesar dubesar commented Nov 7, 2019

@lamberta I have opened a pull request making the relevant changes to the documentation folder.

@bodin-e

This comment has been minimized.

Copy link
Contributor Author

@bodin-e bodin-e commented Nov 7, 2019

Thanks @dubesar, then its sorted.

MarkDaoust added a commit to MarkDaoust/tensorflow that referenced this issue Nov 11, 2019
MarkDaoust added a commit to MarkDaoust/tensorflow that referenced this issue Nov 11, 2019
@dubesar

This comment has been minimized.

Copy link
Contributor

@dubesar dubesar commented Nov 14, 2019

@MarkDaoust this issue can be closed now as it's solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.