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

Documentation change for 'Adding a new op ShapeFn' #5627

Closed
gibiansky opened this issue Nov 15, 2016 · 2 comments
Closed

Documentation change for 'Adding a new op ShapeFn' #5627

gibiansky opened this issue Nov 15, 2016 · 2 comments
Assignees
Labels
type:docs-bug Document issues

Comments

@gibiansky
Copy link
Contributor

In Adding a new Op there is the following line of code that describes how to set the shape function:

@tf.RegisterShape("ZeroOut")(common_shapes.call_cpp_shape_fn)

I think this is wrong (you do not want the @ sign since it's not being used as a decorator). Also, having an explicit import would be helpful.

So it would be nice to change this to:

from tensorflow.python.framework import common_shapes
tf.RegisterShape("ZeroOut")(common_shapes.call_cpp_shape_fn)
@girving
Copy link
Contributor

girving commented Nov 16, 2016

@gibiansky Would you be up for sending a PR?

@girving girving added stat:awaiting response Status - Awaiting response from author type:docs-bug Document issues labels Nov 16, 2016
@vrv
Copy link

vrv commented Nov 16, 2016

We can just remove the line now -- by default all ops call their CPP shape function. (Or at least, they will with the next push).

@girving girving removed the stat:awaiting response Status - Awaiting response from author label Nov 16, 2016
@jhseu jhseu closed this as completed in 20517b9 Nov 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:docs-bug Document issues
Projects
None yet
Development

No branches or pull requests

3 participants