-
Notifications
You must be signed in to change notification settings - Fork 74k
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
tf.nn.max_pool2d: No support for tf.Tensor input for ksize #42973
Comments
This comment has been minimized.
This comment has been minimized.
Thank you @bhack! There seems to be a solution for this issue provided by PR #11875. Use
PR #14983 tries to integrate the utilization of |
Was able to reproduce your issue in Tensorflow 2.5 version, please find the gist here. Thanks! |
this is not working for me |
Was able to reproduce your issue in Tensorflow 2.11 version, please find the gist here. Thanks! |
System information
Describe the current behavior
The ksize arguement of tf.nn.max_pool2d supports only native Python int but not tf.Tensor. This is not a problem when using eager mode, but very disadvantageous when calculating the ksize as a Tensor in TF Graph mode.
TypeError: Expected int for argument 'ksize' not <tf.Tensor 'random_uniform:0' shape=() dtype=int32>.
Describe the expected behavior
Tensor support for tf.nn.max_pool2d function parameters, espacially ksize.
Standalone code to reproduce the issue
Other info / logs
traceback.txt
Thank you in advance!
The text was updated successfully, but these errors were encountered: