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

Error in TF.pad API docs #490

Closed
spitis opened this issue Dec 12, 2015 · 1 comment
Closed

Error in TF.pad API docs #490

spitis opened this issue Dec 12, 2015 · 1 comment

Comments

@spitis
Copy link

spitis commented Dec 12, 2015

Please note the following error in tf.pad in "array_ops.md":

Example 1 currently reads as follows:

# 't' is [[1, 1], [2, 2]]
# 'paddings' is [[1, 1]], [2, 2]] ##This is not a valid tensor
# rank of 't' is 2
pad(t, paddings) ==> 
     [[0, 0, 0, 0, 0] ##This is not the correct output
      [0, 0, 0, 0, 0]
      [0, 1, 1, 0, 0]
     [[0, 2, 2, 0, 0]
      [0, 0, 0, 0, 0]]

It can be fixed as follows:

# 't' is [[1, 1], [2, 2]]
# 'paddings' is [[1, 1], [2, 2]]
# rank of 't' is 2
pad(t, paddings) ==> 
    [[0, 0, 0, 0, 0, 0]
     [0, 0, 1, 1, 0, 0]
     [0, 0, 2, 2, 0, 0]
     [0, 0, 0, 0, 0, 0]]
@mrry
Copy link
Contributor

mrry commented Dec 14, 2015

Thanks for letting us know. This is now fixed upstream, and should be released soon.

darkbuck pushed a commit to darkbuck/tensorflow that referenced this issue Jan 23, 2020
…pstream-sync-190603

Develop upstream sync 190603
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

No branches or pull requests

2 participants